summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2018-11-05 13:01:55 +0100
committerSolomon Peachy <pizza@shaftnet.org>2020-04-06 18:15:41 +0200
commit180cef835bf40d0081895773aaa637ac926bb0ac (patch)
tree48c380d76c0ea40931cb5e863b40fc5dfa1ecba4 /apps
parentced3a20aacf26642ccc3ffd136f64247c67e5769 (diff)
downloadrockbox-180cef835bf40d0081895773aaa637ac926bb0ac.tar.gz
rockbox-180cef835bf40d0081895773aaa637ac926bb0ac.tar.bz2
rockbox-180cef835bf40d0081895773aaa637ac926bb0ac.zip
xDuoo X3II and X20 port
Provided by Roman Stolyarov Integration, Refactoring, and Upstreaming by Solomon Peachy X3II confirmed working by forum tester, X20 is nearly identical. This includes bootloader, main firmware, and the flash image patcher. Eventual Todo: * Further refactor AGPTek Rocker & xduoo hiby bootloaders * Further refactor AGPTek Rocker & xduoo hosted platform code Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES4
-rw-r--r--apps/bitmaps/native/SOURCES4
-rw-r--r--apps/bitmaps/native/hibyicon.130x130x16.bmpbin0 -> 51016 bytes
-rw-r--r--apps/keymaps/keymap-xduoox20.c213
-rw-r--r--apps/keymaps/keymap-xduoox3ii.c213
-rw-r--r--apps/plugins/battery_bench.c12
-rw-r--r--apps/plugins/blackjack.c32
-rw-r--r--apps/plugins/brickmania.c20
-rw-r--r--apps/plugins/calculator.c22
-rw-r--r--apps/plugins/calendar.c20
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.h28
-rw-r--r--apps/plugins/chessclock.c20
-rw-r--r--apps/plugins/chip8.c16
-rw-r--r--apps/plugins/chopper.c10
-rw-r--r--apps/plugins/clix.c16
-rw-r--r--apps/plugins/cube.c20
-rw-r--r--apps/plugins/doom/i_video.c22
-rw-r--r--apps/plugins/fft/fft.c18
-rw-r--r--apps/plugins/flipit.c24
-rw-r--r--apps/plugins/fractals/fractal.h24
-rw-r--r--apps/plugins/goban/goban.h24
-rw-r--r--apps/plugins/imageviewer/imageviewer_button.h30
-rw-r--r--apps/plugins/invadrox.c14
-rw-r--r--apps/plugins/jewels.c20
-rw-r--r--apps/plugins/lib/keymaps.h16
-rw-r--r--apps/plugins/lib/pluginlib_actions.c30
-rw-r--r--apps/plugins/midi/midiplay.c16
-rw-r--r--apps/plugins/minesweeper.c26
-rw-r--r--apps/plugins/mp3_encoder.c13
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c20
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c18
-rw-r--r--apps/plugins/oscilloscope.c29
-rw-r--r--apps/plugins/pacbox/pacbox.h19
-rw-r--r--apps/plugins/pegbox.c34
-rw-r--r--apps/plugins/pong.c16
-rw-r--r--apps/plugins/reversi/reversi-gui.h22
-rw-r--r--apps/plugins/rockblox.c24
-rw-r--r--apps/plugins/rockboy/rockboy.c20
-rw-r--r--apps/plugins/sliding_puzzle.c19
-rw-r--r--apps/plugins/snake.c16
-rw-r--r--apps/plugins/snake2.c18
-rw-r--r--apps/plugins/sokoban.c32
-rw-r--r--apps/plugins/solitaire.c38
-rw-r--r--apps/plugins/spacerocks.c18
-rw-r--r--apps/plugins/star.c32
-rw-r--r--apps/plugins/stopwatch.c16
-rw-r--r--apps/plugins/sudoku/sudoku.h28
-rw-r--r--apps/plugins/text_viewer/tv_button.h24
-rw-r--r--apps/plugins/vu_meter.c22
-rw-r--r--apps/plugins/wormlet.c18
-rw-r--r--apps/plugins/xobox.c18
-rw-r--r--apps/plugins/zxbox/keymaps.h16
-rw-r--r--apps/plugins/zxbox/zxbox_keyb.c18
53 files changed, 1462 insertions, 0 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 67fe678287..20e6fa9d2d 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -323,4 +323,8 @@ keymaps/keymap-dx50.c
keymaps/keymap-agptekrocker.c
#elif CONFIG_KEYPAD == XDUOO_X3_PAD
keymaps/keymap-xduoox3.c
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+keymaps/keymap-xduoox3ii.c
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+keymaps/keymap-xduoox20.c
#endif
diff --git a/apps/bitmaps/native/SOURCES b/apps/bitmaps/native/SOURCES
index ea726d4c07..f74f289214 100644
--- a/apps/bitmaps/native/SOURCES
+++ b/apps/bitmaps/native/SOURCES
@@ -48,6 +48,10 @@ toolsicon.130x130x16.bmp
hibyicon.70x70x16.bmp
rockboxicon.70x70x16.bmp
toolsicon.70x70x16.bmp
+#elif (defined(XDUOO_X3II) || defined(XDUOO_X20))
+hibyicon.130x130x16.bmp
+rockboxicon.130x130x16.bmp
+toolsicon.130x130x16.bmp
#endif
#endif
diff --git a/apps/bitmaps/native/hibyicon.130x130x16.bmp b/apps/bitmaps/native/hibyicon.130x130x16.bmp
new file mode 100644
index 0000000000..0c31b90e28
--- /dev/null
+++ b/apps/bitmaps/native/hibyicon.130x130x16.bmp
Binary files differ
diff --git a/apps/keymaps/keymap-xduoox20.c b/apps/keymaps/keymap-xduoox20.c
new file mode 100644
index 0000000000..3b1b01b7fa
--- /dev/null
+++ b/apps/keymaps/keymap-xduoox20.c
@@ -0,0 +1,213 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2018 by Roman Stolyarov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+/* Button Code Definitions for xDuoo X20 target */
+
+#include "config.h"
+#include "action.h"
+#include "button.h"
+#include "settings.h"
+
+/* {Action Code, Button code, Prereq button code } */
+
+/*
+ * The format of the list is as follows
+ * { Action Code, Button code, Prereq button code }
+ * if there's no need to check the previous button's value, use BUTTON_NONE
+ * Insert LAST_ITEM_IN_LIST at the end of each mapping
+ */
+static const struct button_mapping button_context_standard[] = {
+ { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_MENU, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_standard */
+
+static const struct button_mapping button_context_wps[] = {
+ { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_WPS_SKIPPREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
+ { ACTION_WPS_SEEKBACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_STOPSEEK, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT },
+ { ACTION_WPS_SKIPNEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
+ { ACTION_WPS_SEEKFWD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_STOPSEEK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT },
+ { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_BROWSE, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_WPS_MENU, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_WPS_QUICKSCREEN, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_OPTION },
+ { ACTION_WPS_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_wps */
+
+static const struct button_mapping button_context_list[] = {
+ { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_list */
+
+/** Bookmark Screen **/
+static const struct button_mapping button_context_bmark[] = {
+ { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
+}; /* button_context_bmark */
+
+/** Keyboard **/
+static const struct button_mapping button_context_keyboard[] = {
+ { ACTION_KBD_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_KBD_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_KBD_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_DOWN, BUTTON_OPTION, BUTTON_NONE },
+ { ACTION_KBD_DOWN, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_LEFT, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_LEFT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_RIGHT, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_RIGHT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_BACKSPACE, BUTTON_HOME, BUTTON_NONE },
+ { ACTION_KBD_BACKSPACE, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_keyboard */
+
+/** Pitchscreen **/
+static const struct button_mapping button_context_pitchscreen[] = {
+ { ACTION_PS_INC_SMALL, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_PS_INC_BIG, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_PS_DEC_BIG, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_NUDGE_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_PS_NUDGE_LEFTOFF, BUTTON_PREV|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_NUDGE_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_TOGGLE_MODE, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_RESET, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_PS_EXIT, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_PS_SLOWER, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_FASTER, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_pitchscreen */
+
+/** Quickscreen **/
+static const struct button_mapping button_context_quickscreen[] = {
+ { ACTION_QS_TOP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_QS_TOP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_QS_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_QS_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_QS_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_quickscreen */
+
+/** Settings - General Mappings **/
+static const struct button_mapping button_context_settings[] = {
+ { ACTION_SETTINGS_RESET, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings */
+
+static const struct button_mapping button_context_settings_vol_is_inc[] = {
+ { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings_right_is_inc */
+
+/** Tree **/
+static const struct button_mapping button_context_tree[] = {
+ { ACTION_TREE_WPS, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+ { ACTION_STD_MENU, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_OPTION },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
+}; /* button_context_tree */
+
+/** Yes/No Screen **/
+static const struct button_mapping button_context_yesnoscreen[] = {
+ { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings_yesnoscreen */
+
+/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+const struct button_mapping* get_context_mapping(int context)
+{
+ switch (context)
+ {
+ case CONTEXT_LIST:
+ return button_context_list;
+ case CONTEXT_STD:
+ return button_context_standard;
+ case CONTEXT_BOOKMARKSCREEN:
+ return button_context_bmark;
+ case CONTEXT_KEYBOARD:
+ return button_context_keyboard;
+ case CONTEXT_PITCHSCREEN:
+ return button_context_pitchscreen;
+ case CONTEXT_QUICKSCREEN:
+ return button_context_quickscreen;
+ case CONTEXT_SETTINGS:
+ return button_context_settings;
+ case CONTEXT_SETTINGS_TIME:
+ case CONTEXT_SETTINGS_COLOURCHOOSER:
+ case CONTEXT_SETTINGS_EQ:
+ case CONTEXT_SETTINGS_RECTRIGGER:
+ return button_context_settings_vol_is_inc;
+ case CONTEXT_TREE:
+ case CONTEXT_MAINMENU:
+ return button_context_tree;
+ case CONTEXT_WPS:
+ return button_context_wps;
+ case CONTEXT_YESNOSCREEN:
+ return button_context_yesnoscreen;
+ }
+ return button_context_standard;
+}
diff --git a/apps/keymaps/keymap-xduoox3ii.c b/apps/keymaps/keymap-xduoox3ii.c
new file mode 100644
index 0000000000..d30efaed2c
--- /dev/null
+++ b/apps/keymaps/keymap-xduoox3ii.c
@@ -0,0 +1,213 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2018 by Roman Stolyarov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+/* Button Code Definitions for xDuoo X3ii target */
+
+#include "config.h"
+#include "action.h"
+#include "button.h"
+#include "settings.h"
+
+/* {Action Code, Button code, Prereq button code } */
+
+/*
+ * The format of the list is as follows
+ * { Action Code, Button code, Prereq button code }
+ * if there's no need to check the previous button's value, use BUTTON_NONE
+ * Insert LAST_ITEM_IN_LIST at the end of each mapping
+ */
+static const struct button_mapping button_context_standard[] = {
+ { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_MENU, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_standard */
+
+static const struct button_mapping button_context_wps[] = {
+ { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_WPS_SKIPPREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
+ { ACTION_WPS_SEEKBACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_STOPSEEK, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT },
+ { ACTION_WPS_SKIPNEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
+ { ACTION_WPS_SEEKFWD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_STOPSEEK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT },
+ { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_WPS_BROWSE, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_WPS_MENU, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_WPS_QUICKSCREEN, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_OPTION },
+ { ACTION_WPS_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_wps */
+
+static const struct button_mapping button_context_list[] = {
+ { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_list */
+
+/** Bookmark Screen **/
+static const struct button_mapping button_context_bmark[] = {
+ { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
+}; /* button_context_bmark */
+
+/** Keyboard **/
+static const struct button_mapping button_context_keyboard[] = {
+ { ACTION_KBD_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_KBD_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_KBD_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_DOWN, BUTTON_OPTION, BUTTON_NONE },
+ { ACTION_KBD_DOWN, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_LEFT, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_LEFT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_RIGHT, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_KBD_CURSOR_RIGHT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_BACKSPACE, BUTTON_HOME, BUTTON_NONE },
+ { ACTION_KBD_BACKSPACE, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_KBD_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_keyboard */
+
+/** Pitchscreen **/
+static const struct button_mapping button_context_pitchscreen[] = {
+ { ACTION_PS_INC_SMALL, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_PS_INC_BIG, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_PS_DEC_BIG, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_NUDGE_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_PS_NUDGE_LEFTOFF, BUTTON_PREV|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_NUDGE_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_TOGGLE_MODE, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
+ { ACTION_PS_RESET, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_PS_EXIT, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_PS_SLOWER, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_PS_FASTER, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_pitchscreen */
+
+/** Quickscreen **/
+static const struct button_mapping button_context_quickscreen[] = {
+ { ACTION_QS_TOP, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_QS_TOP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_QS_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_QS_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_QS_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_quickscreen */
+
+/** Settings - General Mappings **/
+static const struct button_mapping button_context_settings[] = {
+ { ACTION_SETTINGS_RESET, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
+ { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE },
+ { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_CANCEL, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings */
+
+static const struct button_mapping button_context_settings_vol_is_inc[] = {
+ { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE },
+ { ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE },
+ { ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings_right_is_inc */
+
+/** Tree **/
+static const struct button_mapping button_context_tree[] = {
+ { ACTION_TREE_WPS, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+ { ACTION_STD_MENU, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_OPTION },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
+}; /* button_context_tree */
+
+/** Yes/No Screen **/
+static const struct button_mapping button_context_yesnoscreen[] = {
+ { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_settings_yesnoscreen */
+
+/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+const struct button_mapping* get_context_mapping(int context)
+{
+ switch (context)
+ {
+ case CONTEXT_LIST:
+ return button_context_list;
+ case CONTEXT_STD:
+ return button_context_standard;
+ case CONTEXT_BOOKMARKSCREEN:
+ return button_context_bmark;
+ case CONTEXT_KEYBOARD:
+ return button_context_keyboard;
+ case CONTEXT_PITCHSCREEN:
+ return button_context_pitchscreen;
+ case CONTEXT_QUICKSCREEN:
+ return button_context_quickscreen;
+ case CONTEXT_SETTINGS:
+ return button_context_settings;
+ case CONTEXT_SETTINGS_TIME:
+ case CONTEXT_SETTINGS_COLOURCHOOSER:
+ case CONTEXT_SETTINGS_EQ:
+ case CONTEXT_SETTINGS_RECTRIGGER:
+ return button_context_settings_vol_is_inc;
+ case CONTEXT_TREE:
+ case CONTEXT_MAINMENU:
+ return button_context_tree;
+ case CONTEXT_WPS:
+ return button_context_wps;
+ case CONTEXT_YESNOSCREEN:
+ return button_context_yesnoscreen;
+ }
+ return button_context_standard;
+}
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 21b2ce4963..f24ad579e8 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -298,6 +298,18 @@
#define BATTERY_ON_TXT "PLAY - start"
#define BATTERY_OFF_TXT "POWER"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define BATTERY_ON BUTTON_PLAY
+#define BATTERY_OFF BUTTON_POWER
+#define BATTERY_ON_TXT "Play - start"
+#define BATTERY_OFF_TXT "POWER"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define BATTERY_ON BUTTON_PLAY
+#define BATTERY_OFF BUTTON_POWER
+#define BATTERY_ON_TXT "Play - start"
+#define BATTERY_OFF_TXT "POWER"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index 52881f0af2..4511d3fad5 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -589,6 +589,38 @@ enum {
#define BJACK_RIGHT BUTTON_NEXT
#define BJACK_LEFT BUTTON_PREV
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define BJACK_SELECT_NAME "PLAY"
+#define BJACK_STAY_NAME "NEXT"
+#define BJACK_QUIT_NAME "POWER"
+#define BJACK_DOUBLE_NAME "PREV"
+#define BJACK_SELECT BUTTON_PLAY
+#define BJACK_QUIT BUTTON_POWER
+#define BJACK_MAX BUTTON_VOL_UP
+#define BJACK_MIN BUTTON_VOL_DOWN
+#define BJACK_STAY BUTTON_NEXT
+#define BJACK_DOUBLEDOWN BUTTON_PREV
+#define BJACK_UP BUTTON_HOME
+#define BJACK_DOWN BUTTON_OPTION
+#define BJACK_RIGHT BUTTON_NEXT
+#define BJACK_LEFT BUTTON_PREV
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define BJACK_SELECT_NAME "PLAY"
+#define BJACK_STAY_NAME "NEXT"
+#define BJACK_QUIT_NAME "POWER"
+#define BJACK_DOUBLE_NAME "PREV"
+#define BJACK_SELECT BUTTON_PLAY
+#define BJACK_QUIT BUTTON_POWER
+#define BJACK_MAX BUTTON_VOL_UP
+#define BJACK_MIN BUTTON_VOL_DOWN
+#define BJACK_STAY BUTTON_NEXT
+#define BJACK_DOUBLEDOWN BUTTON_PREV
+#define BJACK_UP BUTTON_HOME
+#define BJACK_DOWN BUTTON_OPTION
+#define BJACK_RIGHT BUTTON_NEXT
+#define BJACK_LEFT BUTTON_PREV
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME "NEXT"
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index f7c9f9adf2..c5d74bcf37 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -342,6 +342,26 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_HOME
#define DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_PREV
+#define RIGHT BUTTON_NEXT
+#define ALTLEFT BUTTON_VOL_DOWN
+#define ALTRIGHT BUTTON_VOL_UP
+#define SELECT BUTTON_PLAY
+#define UP BUTTON_HOME
+#define DOWN BUTTON_OPTION
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_PREV
+#define RIGHT BUTTON_NEXT
+#define ALTLEFT BUTTON_VOL_DOWN
+#define ALTRIGHT BUTTON_VOL_UP
+#define SELECT BUTTON_PLAY
+#define UP BUTTON_HOME
+#define DOWN BUTTON_OPTION
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_HOME
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index a4a29ff6ac..be5087967c 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -536,6 +536,28 @@ F3: equal to "="
#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CALCULATOR_LEFT BUTTON_PREV
+#define CALCULATOR_RIGHT BUTTON_NEXT
+#define CALCULATOR_UP BUTTON_HOME
+#define CALCULATOR_DOWN BUTTON_OPTION
+#define CALCULATOR_QUIT BUTTON_POWER
+#define CALCULATOR_INPUT_CALC_PRE (BUTTON_OPTION|BUTTON_REPEAT)
+#define CALCULATOR_INPUT (BUTTON_PLAY|BUTTON_REL)
+#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
+#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CALCULATOR_LEFT BUTTON_PREV
+#define CALCULATOR_RIGHT BUTTON_NEXT
+#define CALCULATOR_UP BUTTON_HOME
+#define CALCULATOR_DOWN BUTTON_OPTION
+#define CALCULATOR_QUIT BUTTON_POWER
+#define CALCULATOR_INPUT_CALC_PRE (BUTTON_OPTION|BUTTON_REPEAT)
+#define CALCULATOR_INPUT (BUTTON_PLAY|BUTTON_REL)
+#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
+#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CALCULATOR_LEFT BUTTON_HOME
#define CALCULATOR_RIGHT BUTTON_VOL_DOWN
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 56f9bde193..af550685cc 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -423,6 +423,26 @@
#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CALENDAR_QUIT BUTTON_POWER
+#define CALENDAR_SELECT BUTTON_PLAY
+#define CALENDAR_NEXT_WEEK BUTTON_OPTION
+#define CALENDAR_PREV_WEEK BUTTON_HOME
+#define CALENDAR_NEXT_DAY BUTTON_NEXT
+#define CALENDAR_PREV_DAY BUTTON_PREV
+#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
+#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CALENDAR_QUIT BUTTON_POWER
+#define CALENDAR_SELECT BUTTON_PLAY
+#define CALENDAR_NEXT_WEEK BUTTON_OPTION
+#define CALENDAR_PREV_WEEK BUTTON_HOME
+#define CALENDAR_NEXT_DAY BUTTON_NEXT
+#define CALENDAR_PREV_DAY BUTTON_PREV
+#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
+#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CALENDAR_QUIT BUTTON_POWER
#define CALENDAR_SELECT BUTTON_PLAY
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h
index 3c4d5357a5..9d37953c6f 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -572,6 +572,34 @@
#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CB_SELECT BUTTON_PLAY
+#define CB_UP BUTTON_HOME
+#define CB_DOWN BUTTON_OPTION
+#define CB_LEFT BUTTON_PREV
+#define CB_RIGHT BUTTON_NEXT
+#define CB_PLAY BUTTON_VOL_UP
+#define CB_LEVEL BUTTON_VOL_DOWN
+#define CB_MENU BUTTON_POWER
+#define CB_SCROLL_UP (BUTTON_HOME|BUTTON_REPEAT)
+#define CB_SCROLL_DOWN (BUTTON_OPTION|BUTTON_REPEAT)
+#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
+#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CB_SELECT BUTTON_PLAY
+#define CB_UP BUTTON_HOME
+#define CB_DOWN BUTTON_OPTION
+#define CB_LEFT BUTTON_PREV
+#define CB_RIGHT BUTTON_NEXT
+#define CB_PLAY BUTTON_VOL_UP
+#define CB_LEVEL BUTTON_VOL_DOWN
+#define CB_MENU BUTTON_POWER
+#define CB_SCROLL_UP (BUTTON_HOME|BUTTON_REPEAT)
+#define CB_SCROLL_DOWN (BUTTON_OPTION|BUTTON_REPEAT)
+#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
+#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_PREV
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 6b07e1bab5..d93777860b 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -422,6 +422,26 @@
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANCEL BUTTON_POWER
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CHC_QUIT BUTTON_POWER
+#define CHC_STARTSTOP BUTTON_PLAY
+#define CHC_RESET BUTTON_OPTION
+#define CHC_MENU BUTTON_HOME
+#define CHC_SETTINGS_INC BUTTON_NEXT
+#define CHC_SETTINGS_DEC BUTTON_PREV
+#define CHC_SETTINGS_OK BUTTON_PLAY
+#define CHC_SETTINGS_CANCEL BUTTON_POWER
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CHC_QUIT BUTTON_POWER
+#define CHC_STARTSTOP BUTTON_PLAY
+#define CHC_RESET BUTTON_OPTION
+#define CHC_MENU BUTTON_HOME
+#define CHC_SETTINGS_INC BUTTON_NEXT
+#define CHC_SETTINGS_DEC BUTTON_PREV
+#define CHC_SETTINGS_OK BUTTON_PLAY
+#define CHC_SETTINGS_CANCEL BUTTON_POWER
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CHC_QUIT BUTTON_POWER
#define CHC_STARTSTOP BUTTON_PLAY
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 58d80a2ccf..7c2be3f7e7 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1291,6 +1291,22 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_NEXT
#define CHIP8_KEY8 BUTTON_OPTION
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CHIP8_OFF BUTTON_POWER
+#define CHIP8_KEY2 BUTTON_HOME
+#define CHIP8_KEY4 BUTTON_PREV
+#define CHIP8_KEY5 BUTTON_PLAY
+#define CHIP8_KEY6 BUTTON_NEXT
+#define CHIP8_KEY8 BUTTON_OPTION
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CHIP8_OFF BUTTON_POWER
+#define CHIP8_KEY2 BUTTON_HOME
+#define CHIP8_KEY4 BUTTON_PREV
+#define CHIP8_KEY5 BUTTON_PLAY
+#define CHIP8_KEY6 BUTTON_NEXT
+#define CHIP8_KEY8 BUTTON_OPTION
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CHIP8_OFF BUTTON_POWER
#define CHIP8_KEY2 BUTTON_NEXT
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c
index 249cfe9715..71e24deb8f 100644
--- a/apps/plugins/chopper.c
+++ b/apps/plugins/chopper.c
@@ -214,6 +214,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define ACTION BUTTON_PLAY
#define ACTIONTEXT "PLAY"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define QUIT BUTTON_POWER
+#define ACTION BUTTON_PLAY
+#define ACTIONTEXT "PLAY"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define QUIT BUTTON_POWER
+#define ACTION BUTTON_PLAY
+#define ACTIONTEXT "PLAY"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define QUIT BUTTON_POWER
#define ACTION BUTTON_PLAY
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c
index c6364b14b4..e80fdeab8b 100644
--- a/apps/plugins/clix.c
+++ b/apps/plugins/clix.c
@@ -284,6 +284,22 @@
#define CLIX_BUTTON_RIGHT BUTTON_NEXT
#define CLIX_BUTTON_CLICK BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define CLIX_BUTTON_QUIT BUTTON_POWER
+#define CLIX_BUTTON_UP BUTTON_HOME
+#define CLIX_BUTTON_DOWN BUTTON_OPTION
+#define CLIX_BUTTON_LEFT BUTTON_PREV
+#define CLIX_BUTTON_RIGHT BUTTON_NEXT
+#define CLIX_BUTTON_CLICK BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define CLIX_BUTTON_QUIT BUTTON_POWER
+#define CLIX_BUTTON_UP BUTTON_HOME
+#define CLIX_BUTTON_DOWN BUTTON_OPTION
+#define CLIX_BUTTON_LEFT BUTTON_PREV
+#define CLIX_BUTTON_RIGHT BUTTON_NEXT
+#define CLIX_BUTTON_CLICK BUTTON_PLAY
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define CLIX_BUTTON_QUIT BUTTON_POWER
#define CLIX_BUTTON_UP BUTTON_PREV
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index cad57f9ed6..78fd333773 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -423,6 +423,26 @@
#define CUBE_PAUSE BUTTON_HOME
#define CUBE_HIGHSPEED BUTTON_PLAY
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define CUBE_QUIT BUTTON_POWER
+#define CUBE_NEXT BUTTON_NEXT
+#define CUBE_PREV BUTTON_PREV
+#define CUBE_INC BUTTON_VOL_UP
+#define CUBE_DEC BUTTON_VOL_DOWN
+#define CUBE_MODE BUTTON_OPTION
+#define CUBE_PAUSE BUTTON_HOME
+#define CUBE_HIGHSPEED BUTTON_PLAY
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define CUBE_QUIT BUTTON_POWER
+#define CUBE_NEXT BUTTON_NEXT
+#define CUBE_PREV BUTTON_PREV
+#define CUBE_INC BUTTON_VOL_UP
+#define CUBE_DEC BUTTON_VOL_DOWN
+#define CUBE_MODE BUTTON_OPTION
+#define CUBE_PAUSE BUTTON_HOME
+#define CUBE_HIGHSPEED BUTTON_PLAY
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_NEXT BUTTON_NEXT
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 41194670bf..9f367d7d76 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -566,6 +566,28 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_ENTER BUTTON_PLAY
#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define DOOMBUTTON_UP BUTTON_HOME
+#define DOOMBUTTON_DOWN BUTTON_OPTION
+#define DOOMBUTTON_LEFT BUTTON_PREV
+#define DOOMBUTTON_RIGHT BUTTON_NEXT
+#define DOOMBUTTON_SHOOT BUTTON_PLAY
+#define DOOMBUTTON_OPEN (BUTTON_HOME | BUTTON_POWER)
+#define DOOMBUTTON_ESC BUTTON_POWER
+#define DOOMBUTTON_ENTER BUTTON_PLAY
+#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define DOOMBUTTON_UP BUTTON_HOME
+#define DOOMBUTTON_DOWN BUTTON_OPTION
+#define DOOMBUTTON_LEFT BUTTON_PREV
+#define DOOMBUTTON_RIGHT BUTTON_NEXT
+#define DOOMBUTTON_SHOOT BUTTON_PLAY
+#define DOOMBUTTON_OPEN (BUTTON_HOME | BUTTON_POWER)
+#define DOOMBUTTON_ESC BUTTON_POWER
+#define DOOMBUTTON_ENTER BUTTON_PLAY
+#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define DOOMBUTTON_UP BUTTON_PREV
#define DOOMBUTTON_DOWN BUTTON_NEXT
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index d56e37f9e2..0f4e33759d 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -343,6 +343,24 @@ GREY_INFO_STRUCT
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+# define FFT_PREV_GRAPH BUTTON_PREV
+# define FFT_NEXT_GRAPH BUTTON_NEXT
+# define FFT_ORIENTATION BUTTON_HOME
+# define FFT_FREQ_SCALE BUTTON_OPTION
+# define FFT_WINDOW (BUTTON_HOME|BUTTON_POWER)
+# define FFT_AMP_SCALE BUTTON_PLAY
+# define FFT_QUIT BUTTON_POWER
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+# define FFT_PREV_GRAPH BUTTON_PREV
+# define FFT_NEXT_GRAPH BUTTON_NEXT
+# define FFT_ORIENTATION BUTTON_HOME
+# define FFT_FREQ_SCALE BUTTON_OPTION
+# define FFT_WINDOW (BUTTON_HOME|BUTTON_POWER)
+# define FFT_AMP_SCALE BUTTON_PLAY
+# define FFT_QUIT BUTTON_POWER
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
# define FFT_PREV_GRAPH BUTTON_PREV
# define FFT_NEXT_GRAPH BUTTON_NEXT
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index c108939a95..7d1257ef94 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -494,6 +494,30 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
#define FLIPIT_TOGGLE BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+
+#define FLIPIT_LEFT BUTTON_PREV
+#define FLIPIT_RIGHT BUTTON_NEXT
+#define FLIPIT_UP BUTTON_HOME
+#define FLIPIT_DOWN BUTTON_OPTION
+#define FLIPIT_QUIT BUTTON_POWER
+#define FLIPIT_SHUFFLE (BUTTON_HOME | BUTTON_PREV)
+#define FLIPIT_SOLVE (BUTTON_HOME | BUTTON_NEXT)
+#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
+#define FLIPIT_TOGGLE BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+
+#define FLIPIT_LEFT BUTTON_PREV
+#define FLIPIT_RIGHT BUTTON_NEXT
+#define FLIPIT_UP BUTTON_HOME
+#define FLIPIT_DOWN BUTTON_OPTION
+#define FLIPIT_QUIT BUTTON_POWER
+#define FLIPIT_SHUFFLE (BUTTON_HOME | BUTTON_PREV)
+#define FLIPIT_SOLVE (BUTTON_HOME | BUTTON_NEXT)
+#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
+#define FLIPIT_TOGGLE BUTTON_PLAY
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define FLIPIT_LEFT BUTTON_HOME
diff --git a/apps/plugins/fractals/fractal.h b/apps/plugins/fractals/fractal.h
index 5a56a39b13..679782d37a 100644
--- a/apps/plugins/fractals/fractal.h
+++ b/apps/plugins/fractals/fractal.h
@@ -496,6 +496,30 @@
#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define FRACTAL_QUIT BUTTON_POWER
+#define FRACTAL_UP BUTTON_HOME
+#define FRACTAL_DOWN BUTTON_OPTION
+#define FRACTAL_LEFT BUTTON_PREV
+#define FRACTAL_RIGHT BUTTON_NEXT
+#define FRACTAL_ZOOM_IN BUTTON_VOL_UP
+#define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
+#define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_NEXT)
+#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
+#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define FRACTAL_QUIT BUTTON_POWER
+#define FRACTAL_UP BUTTON_HOME
+#define FRACTAL_DOWN BUTTON_OPTION
+#define FRACTAL_LEFT BUTTON_PREV
+#define FRACTAL_RIGHT BUTTON_NEXT
+#define FRACTAL_ZOOM_IN BUTTON_VOL_UP
+#define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
+#define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_NEXT)
+#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
+#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define FRACTAL_QUIT BUTTON_POWER
#define FRACTAL_UP BUTTON_PREV
diff --git a/apps/plugins/goban/goban.h b/apps/plugins/goban/goban.h
index 9f03937078..e04b4c2447 100644
--- a/apps/plugins/goban/goban.h
+++ b/apps/plugins/goban/goban.h
@@ -464,6 +464,30 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define GBN_BUTTON_UP BUTTON_HOME
+#define GBN_BUTTON_DOWN BUTTON_OPTION
+#define GBN_BUTTON_LEFT BUTTON_PREV
+#define GBN_BUTTON_RIGHT BUTTON_NEXT
+#define GBN_BUTTON_RETREAT BUTTON_VOL_DOWN
+#define GBN_BUTTON_ADVANCE BUTTON_VOL_UP
+#define GBN_BUTTON_MENU BUTTON_POWER
+#define GBN_BUTTON_PLAY BUTTON_PLAY | BUTTON_REL
+#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
+#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define GBN_BUTTON_UP BUTTON_HOME
+#define GBN_BUTTON_DOWN BUTTON_OPTION
+#define GBN_BUTTON_LEFT BUTTON_PREV
+#define GBN_BUTTON_RIGHT BUTTON_NEXT
+#define GBN_BUTTON_RETREAT BUTTON_VOL_DOWN
+#define GBN_BUTTON_ADVANCE BUTTON_VOL_UP
+#define GBN_BUTTON_MENU BUTTON_POWER
+#define GBN_BUTTON_PLAY BUTTON_PLAY | BUTTON_REL
+#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
+#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define GBN_BUTTON_UP BUTTON_PREV
diff --git a/apps/plugins/imageviewer/imageviewer_button.h b/apps/plugins/imageviewer/imageviewer_button.h
index 5ffef12a62..e37febc76a 100644
--- a/apps/plugins/imageviewer/imageviewer_button.h
+++ b/apps/plugins/imageviewer/imageviewer_button.h
@@ -510,6 +510,36 @@
#define IMGVIEW_MENU BUTTON_POWER
#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
+#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
+#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
+#define IMGVIEW_UP BUTTON_HOME
+#define IMGVIEW_DOWN BUTTON_OPTION
+#define IMGVIEW_LEFT BUTTON_PREV
+#define IMGVIEW_RIGHT BUTTON_NEXT
+#define IMGVIEW_NEXT BUTTON_VOL_UP
+#define IMGVIEW_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
+#define IMGVIEW_PREVIOUS BUTTON_VOL_DOWN
+#define IMGVIEW_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
+#define IMGVIEW_MENU BUTTON_POWER
+#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
+#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
+#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
+#define IMGVIEW_UP BUTTON_HOME
+#define IMGVIEW_DOWN BUTTON_OPTION
+#define IMGVIEW_LEFT BUTTON_PREV
+#define IMGVIEW_RIGHT BUTTON_NEXT
+#define IMGVIEW_NEXT BUTTON_VOL_UP
+#define IMGVIEW_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
+#define IMGVIEW_PREVIOUS BUTTON_VOL_DOWN
+#define IMGVIEW_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
+#define IMGVIEW_MENU BUTTON_POWER
+#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index d3feb236cc..8cf4d67f3e 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -272,6 +272,20 @@ CONFIG_KEYPAD == MROBE500_PAD
#define QUIT BUTTON_POWER
#define FIRE BUTTON_MENU
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_HOME
+#define RIGHT BUTTON_VOL_DOWN
+#define FIRE BUTTON_VOL_UP
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_HOME
+#define RIGHT BUTTON_VOL_DOWN
+#define FIRE BUTTON_VOL_UP
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define QUIT BUTTON_POWER
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index bc0bc73183..38121a480c 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -387,6 +387,26 @@ CONFIG_KEYPAD == MROBE500_PAD
#define HK_SELECT "PLAY"
#define HK_CANCEL "POWER"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define JEWELS_UP BUTTON_HOME
+#define JEWELS_DOWN BUTTON_OPTION
+#define JEWELS_LEFT BUTTON_PREV
+#define JEWELS_RIGHT BUTTON_NEXT
+#define JEWELS_SELECT BUTTON_PLAY
+#define JEWELS_CANCEL BUTTON_POWER
+#define HK_SELECT "PLAY"
+#define HK_CANCEL "POWER"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define JEWELS_UP BUTTON_HOME
+#define JEWELS_DOWN BUTTON_OPTION
+#define JEWELS_LEFT BUTTON_PREV
+#define JEWELS_RIGHT BUTTON_NEXT
+#define JEWELS_SELECT BUTTON_PLAY
+#define JEWELS_CANCEL BUTTON_POWER
+#define HK_SELECT "PLAY"
+#define HK_CANCEL "POWER"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define JEWELS_UP BUTTON_PREV
#define JEWELS_DOWN BUTTON_NEXT
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index e240a0989e..e3de03f222 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -223,6 +223,22 @@
#define BTN_FIRE BUTTON_PLAY
#define BTN_PAUSE BUTTON_POWER
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define BTN_UP BUTTON_VOL_UP
+#define BTN_DOWN BUTTON_VOL_DOWN
+#define BTN_LEFT BUTTON_PREV
+#define BTN_RIGHT BUTTON_NEXT
+#define BTN_FIRE BUTTON_PLAY
+#define BTN_PAUSE BUTTON_POWER
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define BTN_UP BUTTON_VOL_UP
+#define BTN_DOWN BUTTON_VOL_DOWN
+#define BTN_LEFT BUTTON_PREV
+#define BTN_RIGHT BUTTON_NEXT
+#define BTN_FIRE BUTTON_PLAY
+#define BTN_PAUSE BUTTON_POWER
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define BTN_UP BUTTON_PREV
#define BTN_DOWN BUTTON_NEXT
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index 97b5a1e1bf..0834e020f4 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -237,6 +237,24 @@ const struct button_mapping pla_main_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+ { PLA_UP, BUTTON_HOME, BUTTON_NONE },
+ { PLA_DOWN, BUTTON_OPTION, BUTTON_NONE },
+ { PLA_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { PLA_UP_REPEAT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+ { PLA_UP, BUTTON_HOME, BUTTON_NONE },
+ { PLA_DOWN, BUTTON_OPTION, BUTTON_NONE },
+ { PLA_LEFT, BUTTON_PREV, BUTTON_NONE },
+ { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE },
+ { PLA_UP_REPEAT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{ PLA_UP, BUTTON_PREV, BUTTON_NONE },
{ PLA_DOWN, BUTTON_NEXT, BUTTON_NONE },
@@ -480,6 +498,18 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+ {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
+ {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
+ {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
+ {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
+ {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+ {PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
+ {PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
+ {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
+ {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
+ {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c
index 8e867e5173..e6e2b4bf51 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -301,6 +301,22 @@
#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
#define MIDI_PLAYPAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define MIDI_QUIT BUTTON_POWER
+#define MIDI_FFWD BUTTON_NEXT
+#define MIDI_REWIND BUTTON_PREV
+#define MIDI_VOL_UP BUTTON_VOL_UP
+#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
+#define MIDI_PLAYPAUSE BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define MIDI_QUIT BUTTON_POWER
+#define MIDI_FFWD BUTTON_NEXT
+#define MIDI_REWIND BUTTON_PREV
+#define MIDI_VOL_UP BUTTON_VOL_UP
+#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
+#define MIDI_PLAYPAUSE BUTTON_PLAY
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define MIDI_QUIT BUTTON_POWER
#define MIDI_FFWD BUTTON_VOL_DOWN
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 956ba128d5..917f90dcd0 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -417,6 +417,32 @@ CONFIG_KEYPAD == MROBE500_PAD
# define MINESWP_DISCOVER2 BUTTON_VOL_UP
# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+# define MINESWP_LEFT BUTTON_PREV
+# define MINESWP_RIGHT BUTTON_NEXT
+# define MINESWP_UP BUTTON_HOME
+# define MINESWP_DOWN BUTTON_OPTION
+# define MINESWP_QUIT BUTTON_POWER
+# define MINESWP_TOGGLE_PRE BUTTON_PLAY
+# define MINESWP_TOGGLE (BUTTON_PLAY | BUTTON_REL)
+# define MINESWP_TOGGLE2 BUTTON_VOL_DOWN
+# define MINESWP_DISCOVER (BUTTON_PLAY | BUTTON_REPEAT)
+# define MINESWP_DISCOVER2 BUTTON_VOL_UP
+# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+# define MINESWP_LEFT BUTTON_PREV
+# define MINESWP_RIGHT BUTTON_NEXT
+# define MINESWP_UP BUTTON_HOME
+# define MINESWP_DOWN BUTTON_OPTION
+# define MINESWP_QUIT BUTTON_POWER
+# define MINESWP_TOGGLE_PRE BUTTON_PLAY
+# define MINESWP_TOGGLE (BUTTON_PLAY | BUTTON_REL)
+# define MINESWP_TOGGLE2 BUTTON_VOL_DOWN
+# define MINESWP_DISCOVER (BUTTON_PLAY | BUTTON_REPEAT)
+# define MINESWP_DISCOVER2 BUTTON_VOL_UP
+# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
# define MINESWP_LEFT BUTTON_HOME
# define MINESWP_RIGHT BUTTON_VOL_DOWN
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index d147120cd4..3b912ba606 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2562,6 +2562,19 @@ CONFIG_KEYPAD == MROBE500_PAD
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define MP3ENC_PREV BUTTON_HOME
+#define MP3ENC_NEXT BUTTON_OPTION
+#define MP3ENC_DONE BUTTON_POWER
+#define MP3ENC_SELECT BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define MP3ENC_PREV BUTTON_HOME
+#define MP3ENC_NEXT BUTTON_OPTION
+#define MP3ENC_DONE BUTTON_POWER
+#define MP3ENC_SELECT BUTTON_PLAY
+
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define MP3ENC_PREV BUTTON_PREV
#define MP3ENC_NEXT BUTTON_NEXT
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 8427db12b4..d5d7c7c019 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -316,6 +316,26 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define MPEG_START_TIME_SELECT BUTTON_PLAY
+#define MPEG_START_TIME_LEFT BUTTON_PREV
+#define MPEG_START_TIME_RIGHT BUTTON_NEXT
+#define MPEG_START_TIME_UP BUTTON_HOME
+#define MPEG_START_TIME_DOWN BUTTON_OPTION
+#define MPEG_START_TIME_LEFT2 BUTTON_VOL_UP
+#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
+#define MPEG_START_TIME_EXIT BUTTON_POWER
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define MPEG_START_TIME_SELECT BUTTON_PLAY
+#define MPEG_START_TIME_LEFT BUTTON_PREV
+#define MPEG_START_TIME_RIGHT BUTTON_NEXT
+#define MPEG_START_TIME_UP BUTTON_HOME
+#define MPEG_START_TIME_DOWN BUTTON_OPTION
+#define MPEG_START_TIME_LEFT2 BUTTON_VOL_UP
+#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
+#define MPEG_START_TIME_EXIT BUTTON_POWER
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define MPEG_START_TIME_SELECT BUTTON_PLAY
#define MPEG_START_TIME_LEFT BUTTON_HOME
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 39ea484ff2..eed1fab6d7 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -450,6 +450,24 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_PREV
#define MPEG_FF BUTTON_NEXT
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define MPEG_MENU BUTTON_PLAY
+#define MPEG_STOP BUTTON_POWER
+#define MPEG_PAUSE BUTTON_HOME
+#define MPEG_VOLDOWN BUTTON_VOL_DOWN
+#define MPEG_VOLUP BUTTON_VOL_UP
+#define MPEG_RW BUTTON_PREV
+#define MPEG_FF BUTTON_NEXT
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define MPEG_MENU BUTTON_PLAY
+#define MPEG_STOP BUTTON_POWER
+#define MPEG_PAUSE BUTTON_HOME
+#define MPEG_VOLDOWN BUTTON_VOL_DOWN
+#define MPEG_VOLUP BUTTON_VOL_UP
+#define MPEG_RW BUTTON_PREV
+#define MPEG_FF BUTTON_NEXT
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define MPEG_MENU BUTTON_PLAY
#define MPEG_STOP BUTTON_POWER
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index f4711d4e0e..6702add139 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -518,6 +518,35 @@
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#define NEED_LASTBUTTON
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define OSCILLOSCOPE_QUIT BUTTON_POWER
+#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
+#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
+#define OSCILLOSCOPE_ORIENTATION_PRE BUTTON_PLAY
+#define OSCILLOSCOPE_ORIENTATION (BUTTON_PLAY | BUTTON_REPEAT)
+#define OSCILLOSCOPE_ADVMODE BUTTON_HOME
+#define OSCILLOSCOPE_PAUSE BUTTON_OPTION
+#define OSCILLOSCOPE_SPEED_UP BUTTON_NEXT
+#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
+#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
+#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
+#define NEED_LASTBUTTON
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define OSCILLOSCOPE_QUIT BUTTON_POWER
+#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
+#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
+#define OSCILLOSCOPE_ORIENTATION_PRE BUTTON_PLAY
+#define OSCILLOSCOPE_ORIENTATION (BUTTON_PLAY | BUTTON_REPEAT)
+#define OSCILLOSCOPE_ADVMODE BUTTON_HOME
+#define OSCILLOSCOPE_PAUSE BUTTON_OPTION
+#define OSCILLOSCOPE_SPEED_UP BUTTON_NEXT
+#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
+#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
+#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
+#define NEED_LASTBUTTON
+
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_POWER
#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index 0e3de62dfa..78a171467a 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -364,6 +364,25 @@
#define PACMAN_1UP BUTTON_VOLUP
#define PACMAN_COIN BUTTON_VOLDOWN
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define PACMAN_UP BUTTON_PREV
+#define PACMAN_DOWN BUTTON_NEXT
+#define PACMAN_LEFT BUTTON_HOME
+#define PACMAN_RIGHT BUTTON_VOL_DOWN
+#define PACMAN_MENU BUTTON_POWER
+#define PACMAN_1UP BUTTON_VOL_UP
+#define PACMAN_COIN BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define PACMAN_UP BUTTON_PREV
+#define PACMAN_DOWN BUTTON_NEXT
+#define PACMAN_LEFT BUTTON_HOME
+#define PACMAN_RIGHT BUTTON_VOL_DOWN
+#define PACMAN_MENU BUTTON_POWER
+#define PACMAN_1UP BUTTON_VOL_UP
+#define PACMAN_COIN BUTTON_PLAY
+
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define PACMAN_UP BUTTON_PREV
#define PACMAN_DOWN BUTTON_NEXT
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index cc2e8e3f23..b638f2feeb 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -660,6 +660,40 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define PEGBOX_SELECT BUTTON_PLAY
+#define PEGBOX_QUIT BUTTON_POWER
+#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
+#define PEGBOX_LVL_UP BUTTON_VOL_UP
+#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
+#define PEGBOX_UP BUTTON_HOME
+#define PEGBOX_DOWN BUTTON_OPTION
+#define PEGBOX_RIGHT BUTTON_NEXT
+#define PEGBOX_LEFT BUTTON_PREV
+
+#define SELECT_TEXT "PLAY"
+#define QUIT_TEXT "POWER"
+#define RESTART_TEXT "HOME"
+#define LVL_UP_TEXT "VOL+"
+#define LVL_DOWN_TEXT "VOL-"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define PEGBOX_SELECT BUTTON_PLAY
+#define PEGBOX_QUIT BUTTON_POWER
+#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
+#define PEGBOX_LVL_UP BUTTON_VOL_UP
+#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
+#define PEGBOX_UP BUTTON_HOME
+#define PEGBOX_DOWN BUTTON_OPTION
+#define PEGBOX_RIGHT BUTTON_NEXT
+#define PEGBOX_LEFT BUTTON_PREV
+
+#define SELECT_TEXT "PLAY"
+#define QUIT_TEXT "POWER"
+#define RESTART_TEXT "HOME"
+#define LVL_UP_TEXT "VOL+"
+#define LVL_DOWN_TEXT "VOL-"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index cb3006d7c4..3656a35fd2 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -317,6 +317,22 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_RIGHT_UP BUTTON_HOME
#define PONG_RIGHT_DOWN BUTTON_NEXT
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define PONG_QUIT BUTTON_POWER
+#define PONG_PAUSE BUTTON_PLAY
+#define PONG_LEFT_UP BUTTON_PREV
+#define PONG_LEFT_DOWN BUTTON_OPTION
+#define PONG_RIGHT_UP BUTTON_HOME
+#define PONG_RIGHT_DOWN BUTTON_NEXT
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define PONG_QUIT BUTTON_POWER
+#define PONG_PAUSE BUTTON_PLAY
+#define PONG_LEFT_UP BUTTON_PREV
+#define PONG_LEFT_DOWN BUTTON_OPTION
+#define PONG_RIGHT_UP BUTTON_HOME
+#define PONG_RIGHT_DOWN BUTTON_NEXT
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define PONG_QUIT BUTTON_POWER
#define PONG_PAUSE BUTTON_PREV
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h
index cba34d2814..4ec6bcb67b 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -339,6 +339,28 @@
#define REVERSI_BUTTON_MENU BUTTON_PLAY
#define REVERSI_BUTTON_MENU_LONGPRESS
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define REVERSI_BUTTON_QUIT BUTTON_POWER
+#define REVERSI_BUTTON_UP BUTTON_HOME
+#define REVERSI_BUTTON_DOWN BUTTON_OPTION
+#define REVERSI_BUTTON_LEFT BUTTON_PREV
+#define REVERSI_BUTTON_RIGHT BUTTON_NEXT
+#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MENU BUTTON_PLAY
+#define REVERSI_BUTTON_MENU_LONGPRESS
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define REVERSI_BUTTON_QUIT BUTTON_POWER
+#define REVERSI_BUTTON_UP BUTTON_HOME
+#define REVERSI_BUTTON_DOWN BUTTON_OPTION
+#define REVERSI_BUTTON_LEFT BUTTON_PREV
+#define REVERSI_BUTTON_RIGHT BUTTON_NEXT
+#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MENU BUTTON_PLAY
+#define REVERSI_BUTTON_MENU_LONGPRESS
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define REVERSI_BUTTON_QUIT BUTTON_POWER
#define REVERSI_BUTTON_UP BUTTON_PREV
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index 13eb593775..e2fedab200 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -492,6 +492,30 @@
#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+
+#define ROCKBLOX_OFF BUTTON_POWER
+#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
+#define ROCKBLOX_ROTATE_CCW2 BUTTON_VOL_DOWN
+#define ROCKBLOX_ROTATE_CW BUTTON_VOL_UP
+#define ROCKBLOX_DOWN BUTTON_OPTION
+#define ROCKBLOX_LEFT BUTTON_PREV
+#define ROCKBLOX_RIGHT BUTTON_NEXT
+#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
+#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+
+#define ROCKBLOX_OFF BUTTON_POWER
+#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
+#define ROCKBLOX_ROTATE_CCW2 BUTTON_VOL_DOWN
+#define ROCKBLOX_ROTATE_CW BUTTON_VOL_UP
+#define ROCKBLOX_DOWN BUTTON_OPTION
+#define ROCKBLOX_LEFT BUTTON_PREV
+#define ROCKBLOX_RIGHT BUTTON_NEXT
+#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
+#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define ROCKBLOX_OFF BUTTON_POWER
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 8886793ab7..f188dc1e24 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -433,6 +433,26 @@ static void setoptions (void)
options.SELECT = BUTTON_VOL_UP;
options.MENU = BUTTON_POWER;
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+ options.UP = BUTTON_PREV;
+ options.DOWN = BUTTON_NEXT;
+
+ options.A = BUTTON_HOME;
+ options.B = BUTTON_OPTION;
+ options.START = BUTTON_VOL_DOWN;
+ options.SELECT = BUTTON_VOL_UP;
+ options.MENU = BUTTON_POWER;
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+ options.UP = BUTTON_PREV;
+ options.DOWN = BUTTON_NEXT;
+
+ options.A = BUTTON_HOME;
+ options.B = BUTTON_OPTION;
+ options.START = BUTTON_VOL_DOWN;
+ options.SELECT = BUTTON_VOL_UP;
+ options.MENU = BUTTON_POWER;
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
options.UP = BUTTON_PREV;
options.DOWN = BUTTON_NEXT;
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 0ea36c84b8..9b863906ce 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -340,6 +340,25 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define PUZZLE_QUIT BUTTON_POWER
+#define PUZZLE_LEFT BUTTON_PREV
+#define PUZZLE_RIGHT BUTTON_NEXT
+#define PUZZLE_UP BUTTON_HOME
+#define PUZZLE_DOWN BUTTON_OPTION
+#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
+#define PUZZLE_PICTURE BUTTON_PLAY
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define PUZZLE_QUIT BUTTON_POWER
+#define PUZZLE_LEFT BUTTON_PREV
+#define PUZZLE_RIGHT BUTTON_NEXT
+#define PUZZLE_UP BUTTON_HOME
+#define PUZZLE_DOWN BUTTON_OPTION
+#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
+#define PUZZLE_PICTURE BUTTON_PLAY
+
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_HOME
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index 2518316bdd..ae1e4350ad 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -297,6 +297,22 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_DOWN BUTTON_OPTION
#define SNAKE_PLAYPAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define SNAKE_QUIT BUTTON_POWER
+#define SNAKE_LEFT BUTTON_PREV
+#define SNAKE_RIGHT BUTTON_NEXT
+#define SNAKE_UP BUTTON_HOME
+#define SNAKE_DOWN BUTTON_OPTION
+#define SNAKE_PLAYPAUSE BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define SNAKE_QUIT BUTTON_POWER
+#define SNAKE_LEFT BUTTON_PREV
+#define SNAKE_RIGHT BUTTON_NEXT
+#define SNAKE_UP BUTTON_HOME
+#define SNAKE_DOWN BUTTON_OPTION
+#define SNAKE_PLAYPAUSE BUTTON_PLAY
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define SNAKE_QUIT BUTTON_POWER
#define SNAKE_LEFT BUTTON_HOME
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 9ea79504e4..a9f0942806 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -428,6 +428,24 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define SNAKE2_LEFT BUTTON_PREV
+#define SNAKE2_RIGHT BUTTON_NEXT
+#define SNAKE2_UP BUTTON_HOME
+#define SNAKE2_DOWN BUTTON_OPTION
+#define SNAKE2_QUIT BUTTON_POWER
+#define SNAKE2_PLAYPAUSE BUTTON_PLAY
+#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define SNAKE2_LEFT BUTTON_PREV
+#define SNAKE2_RIGHT BUTTON_NEXT
+#define SNAKE2_UP BUTTON_HOME
+#define SNAKE2_DOWN BUTTON_OPTION
+#define SNAKE2_QUIT BUTTON_POWER
+#define SNAKE2_PLAYPAUSE BUTTON_PLAY
+#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define SNAKE2_LEFT BUTTON_HOME
#define SNAKE2_RIGHT BUTTON_VOL_DOWN
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 17971ec4db..450c881d1e 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -667,6 +667,38 @@
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define SOKOBAN_LEFT BUTTON_PREV
+#define SOKOBAN_RIGHT BUTTON_NEXT
+#define SOKOBAN_UP BUTTON_HOME
+#define SOKOBAN_DOWN BUTTON_OPTION
+#define SOKOBAN_MENU BUTTON_POWER
+#define SOKOBAN_UNDO_PRE BUTTON_PLAY
+#define SOKOBAN_UNDO (BUTTON_PLAY | BUTTON_REL)
+#define SOKOBAN_REDO (BUTTON_POWER | BUTTON_PLAY)
+#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN
+#define SOKOBAN_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_NEXT)
+#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP
+#define SOKOBAN_PAUSE BUTTON_PLAY
+#define BUTTON_SAVE BUTTON_PLAY
+#define BUTTON_SAVE_NAME "PLAY"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define SOKOBAN_LEFT BUTTON_PREV
+#define SOKOBAN_RIGHT BUTTON_NEXT
+#define SOKOBAN_UP BUTTON_HOME
+#define SOKOBAN_DOWN BUTTON_OPTION
+#define SOKOBAN_MENU BUTTON_POWER
+#define SOKOBAN_UNDO_PRE BUTTON_PLAY
+#define SOKOBAN_UNDO (BUTTON_PLAY | BUTTON_REL)
+#define SOKOBAN_REDO (BUTTON_POWER | BUTTON_PLAY)
+#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN
+#define SOKOBAN_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_NEXT)
+#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP
+#define SOKOBAN_PAUSE BUTTON_PLAY
+#define BUTTON_SAVE BUTTON_PLAY
+#define BUTTON_SAVE_NAME "PLAY"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define SOKOBAN_LEFT BUTTON_HOME
#define SOKOBAN_RIGHT BUTTON_VOL_DOWN
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 1ee79bb86a..dd4c8d3447 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -706,6 +706,44 @@ CONFIG_KEYPAD == MROBE500_PAD
# define HK_CUR2STACK "DBL PLAY"
# define HK_REM2STACK "NEXT"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+# define SOL_QUIT BUTTON_POWER
+# define SOL_UP BUTTON_HOME
+# define SOL_DOWN BUTTON_OPTION
+# define SOL_LEFT BUTTON_PREV
+# define SOL_RIGHT BUTTON_NEXT
+# define SOL_MOVE_PRE BUTTON_PLAY
+# define SOL_MOVE (BUTTON_PLAY | BUTTON_REL)
+# define SOL_DRAW (BUTTON_POWER | BUTTON_REPEAT)
+# define SOL_REM2CUR BUTTON_VOL_DOWN
+# define SOL_CUR2STACK_PRE BUTTON_PLAY
+# define SOL_CUR2STACK (BUTTON_PLAY | BUTTON_REPEAT)
+# define SOL_REM2STACK BUTTON_VOL_UP
+# define HK_MOVE "PLAY"
+# define HK_DRAW "DBL HOME"
+# define HK_REM2CUR "PREV"
+# define HK_CUR2STACK "DBL PLAY"
+# define HK_REM2STACK "NEXT"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+# define SOL_QUIT BUTTON_POWER
+# define SOL_UP BUTTON_HOME
+# define SOL_DOWN BUTTON_OPTION
+# define SOL_LEFT BUTTON_PREV
+# define SOL_RIGHT BUTTON_NEXT
+# define SOL_MOVE_PRE BUTTON_PLAY
+# define SOL_MOVE (BUTTON_PLAY | BUTTON_REL)
+# define SOL_DRAW (BUTTON_POWER | BUTTON_REPEAT)
+# define SOL_REM2CUR BUTTON_VOL_DOWN
+# define SOL_CUR2STACK_PRE BUTTON_PLAY
+# define SOL_CUR2STACK (BUTTON_PLAY | BUTTON_REPEAT)
+# define SOL_REM2STACK BUTTON_VOL_UP
+# define HK_MOVE "PLAY"
+# define HK_DRAW "DBL HOME"
+# define HK_REM2CUR "PREV"
+# define HK_CUR2STACK "DBL PLAY"
+# define HK_REM2STACK "NEXT"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
# define SOL_QUIT BUTTON_POWER
# define SOL_UP BUTTON_PREV
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c
index 15d4039b4d..98c6d1a032 100644
--- a/apps/plugins/spacerocks.c
+++ b/apps/plugins/spacerocks.c
@@ -363,6 +363,24 @@
#define AST_RIGHT BUTTON_NEXT
#define AST_FIRE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define AST_PAUSE BUTTON_VOL_UP
+#define AST_QUIT BUTTON_POWER
+#define AST_THRUST BUTTON_HOME
+#define AST_HYPERSPACE BUTTON_OPTION
+#define AST_LEFT BUTTON_PREV
+#define AST_RIGHT BUTTON_NEXT
+#define AST_FIRE BUTTON_PLAY
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define AST_PAUSE BUTTON_VOL_UP
+#define AST_QUIT BUTTON_POWER
+#define AST_THRUST BUTTON_HOME
+#define AST_HYPERSPACE BUTTON_OPTION
+#define AST_LEFT BUTTON_PREV
+#define AST_RIGHT BUTTON_NEXT
+#define AST_FIRE BUTTON_PLAY
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define AST_PAUSE BUTTON_PLAY
#define AST_QUIT BUTTON_POWER
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index fdf67bec4c..43036e2808 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -639,6 +639,38 @@
#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define STAR_QUIT BUTTON_POWER
+#define STAR_LEFT BUTTON_PREV
+#define STAR_RIGHT BUTTON_NEXT
+#define STAR_UP BUTTON_HOME
+#define STAR_DOWN BUTTON_OPTION
+#define STAR_TOGGLE_CONTROL BUTTON_PLAY
+#define STAR_LEVEL_UP (BUTTON_PLAY | BUTTON_NEXT)
+#define STAR_LEVEL_DOWN (BUTTON_PLAY | BUTTON_PREV)
+#define STAR_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_OPTION)
+#define STAR_TOGGLE_CONTROL_NAME "PLAY"
+#define STAR_QUIT_NAME "POWER"
+#define STAR_LEVEL_UP_NAME "PLAY + NEXT"
+#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
+#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define STAR_QUIT BUTTON_POWER
+#define STAR_LEFT BUTTON_PREV
+#define STAR_RIGHT BUTTON_NEXT
+#define STAR_UP BUTTON_HOME
+#define STAR_DOWN BUTTON_OPTION
+#define STAR_TOGGLE_CONTROL BUTTON_PLAY
+#define STAR_LEVEL_UP (BUTTON_PLAY | BUTTON_NEXT)
+#define STAR_LEVEL_DOWN (BUTTON_PLAY | BUTTON_PREV)
+#define STAR_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_OPTION)
+#define STAR_TOGGLE_CONTROL_NAME "PLAY"
+#define STAR_QUIT_NAME "POWER"
+#define STAR_LEVEL_UP_NAME "PLAY + NEXT"
+#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
+#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define STAR_QUIT BUTTON_POWER
#define STAR_LEFT BUTTON_HOME
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index 5e83859d89..a806e4e830 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -321,6 +321,22 @@
#define STOPWATCH_SCROLL_UP BUTTON_HOME
#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define STOPWATCH_QUIT BUTTON_POWER
+#define STOPWATCH_START_STOP BUTTON_NEXT
+#define STOPWATCH_RESET_TIMER BUTTON_PREV
+#define STOPWATCH_LAP_TIMER BUTTON_PLAY
+#define STOPWATCH_SCROLL_UP BUTTON_HOME
+#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define STOPWATCH_QUIT BUTTON_POWER
+#define STOPWATCH_START_STOP BUTTON_NEXT
+#define STOPWATCH_RESET_TIMER BUTTON_PREV
+#define STOPWATCH_LAP_TIMER BUTTON_PLAY
+#define STOPWATCH_SCROLL_UP BUTTON_HOME
+#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define STOPWATCH_QUIT BUTTON_POWER
#define STOPWATCH_START_STOP BUTTON_NEXT
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 62ec80dba8..2bee868de9 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -437,6 +437,34 @@
#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
+#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
+#define SUDOKU_BUTTON_UP BUTTON_HOME
+#define SUDOKU_BUTTON_DOWN BUTTON_OPTION
+#define SUDOKU_BUTTON_LEFT BUTTON_PREV
+#define SUDOKU_BUTTON_RIGHT BUTTON_NEXT
+#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
+#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
+#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY
+#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER
+#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
+#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
+#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
+#define SUDOKU_BUTTON_UP BUTTON_HOME
+#define SUDOKU_BUTTON_DOWN BUTTON_OPTION
+#define SUDOKU_BUTTON_LEFT BUTTON_PREV
+#define SUDOKU_BUTTON_RIGHT BUTTON_NEXT
+#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
+#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
+#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY
+#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER
+#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
+#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
diff --git a/apps/plugins/text_viewer/tv_button.h b/apps/plugins/text_viewer/tv_button.h
index da6453ff8d..6ee8f9bbf1 100644
--- a/apps/plugins/text_viewer/tv_button.h
+++ b/apps/plugins/text_viewer/tv_button.h
@@ -562,6 +562,30 @@
#define TV_LINE_DOWN BUTTON_OPTION
#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define TV_QUIT BUTTON_POWER
+#define TV_SCROLL_UP BUTTON_VOL_UP
+#define TV_SCROLL_DOWN BUTTON_VOL_DOWN
+#define TV_SCREEN_LEFT BUTTON_PREV
+#define TV_SCREEN_RIGHT BUTTON_NEXT
+#define TV_MENU BUTTON_PLAY
+#define TV_AUTOSCROLL (BUTTON_POWER | BUTTON_HOME)
+#define TV_LINE_UP BUTTON_HOME
+#define TV_LINE_DOWN BUTTON_OPTION
+#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define TV_QUIT BUTTON_POWER
+#define TV_SCROLL_UP BUTTON_VOL_UP
+#define TV_SCROLL_DOWN BUTTON_VOL_DOWN
+#define TV_SCREEN_LEFT BUTTON_PREV
+#define TV_SCREEN_RIGHT BUTTON_NEXT
+#define TV_MENU BUTTON_PLAY
+#define TV_AUTOSCROLL (BUTTON_POWER | BUTTON_HOME)
+#define TV_LINE_UP BUTTON_HOME
+#define TV_LINE_DOWN BUTTON_OPTION
+#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
+
/* Xuelin 770/770c keys */
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define TV_QUIT BUTTON_POWER
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index eaa92d4b48..33ad38d72c 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -432,6 +432,28 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
+#define VUMETER_QUIT BUTTON_POWER
+#define VUMETER_HELP BUTTON_HOME
+#define VUMETER_MENU BUTTON_PLAY
+#define VUMETER_UP BUTTON_VOL_UP
+#define VUMETER_DOWN BUTTON_VOL_DOWN
+#define LABEL_HELP "HOME"
+#define LABEL_QUIT "POWER"
+#define LABEL_MENU "PLAY"
+#define LABEL_VOLUME "VOL UP/DN"
+
+#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#define VUMETER_QUIT BUTTON_POWER
+#define VUMETER_HELP BUTTON_HOME
+#define VUMETER_MENU BUTTON_PLAY
+#define VUMETER_UP BUTTON_VOL_UP
+#define VUMETER_DOWN BUTTON_VOL_DOWN
+#define LABEL_HELP "HOME"
+#define LABEL_QUIT "POWER"
+#define LABEL_MENU "PLAY"
+#define LABEL_VOLUME "VOL UP/DN"
+
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
#define VUMETER_QUIT BUTTON_POWER
#define VUMETER_HELP BUTTON_HOME
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index 9adfc97b81..d342511419 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -402,6 +402,24 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define BTN_DIR_UP BUTTON_HOME
+#define BTN_DIR_DOWN BUTTON_OPTION
+#define BTN_DIR_LEFT BUTTON_PREV
+#define BTN_DIR_RIGHT BUTTON_NEXT
+#define BTN_STARTPAUSE BUTTON_PLAY
+#define BTN_QUIT BUTTON_POWER
+#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define BTN_DIR_UP BUTTON_HOME
+#define BTN_DIR_DOWN BUTTON_OPTION
+#define BTN_DIR_LEFT BUTTON_PREV
+#define BTN_DIR_RIGHT BUTTON_NEXT
+#define BTN_STARTPAUSE BUTTON_PLAY
+#define BTN_QUIT BUTTON_POWER
+#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define BTN_DIR_UP BUTTON_PREV
#define BTN_DIR_DOWN BUTTON_NEXT
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 8acdf85015..9643641569 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -351,6 +351,24 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_OPTION
#define PAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_PREV
+#define RIGHT BUTTON_NEXT
+#define UP BUTTON_HOME
+#define DOWN BUTTON_OPTION
+#define PAUSE BUTTON_PLAY
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+
+#define QUIT BUTTON_POWER
+#define LEFT BUTTON_PREV
+#define RIGHT BUTTON_NEXT
+#define UP BUTTON_HOME
+#define DOWN BUTTON_OPTION
+#define PAUSE BUTTON_PLAY
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define QUIT BUTTON_POWER
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index ce527c561e..53dd9e8d88 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -290,6 +290,22 @@
#define ZX_UP BUTTON_HOME
#define ZX_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#define ZX_SELECT BUTTON_PLAY
+#define ZX_MENU BUTTON_POWER
+#define ZX_LEFT BUTTON_PREV
+#define ZX_RIGHT BUTTON_NEXT
+#define ZX_UP BUTTON_HOME
+#define ZX_DOWN BUTTON_OPTION
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#define ZX_SELECT BUTTON_PLAY
+#define ZX_MENU BUTTON_POWER
+#define ZX_LEFT BUTTON_PREV
+#define ZX_RIGHT BUTTON_NEXT
+#define ZX_UP BUTTON_HOME
+#define ZX_DOWN BUTTON_OPTION
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define ZX_SELECT BUTTON_PLAY
#define ZX_MENU BUTTON_POWER
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index b3f1ca70e8..4a26accc8a 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -287,6 +287,24 @@
#define KBD_UP BUTTON_HOME
#define KBD_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+
+#define KBD_SELECT BUTTON_PLAY
+#define KBD_ABORT BUTTON_POWER
+#define KBD_LEFT BUTTON_PREV
+#define KBD_RIGHT BUTTON_NEXT
+#define KBD_UP BUTTON_HOME
+#define KBD_DOWN BUTTON_OPTION
+
+#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+
+#define KBD_SELECT BUTTON_PLAY
+#define KBD_ABORT BUTTON_POWER
+#define KBD_LEFT BUTTON_PREV
+#define KBD_RIGHT BUTTON_NEXT
+#define KBD_UP BUTTON_HOME
+#define KBD_DOWN BUTTON_OPTION
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define KBD_SELECT BUTTON_PLAY