summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-06-28 06:24:26 -0400
committerMichael Giacomelli <giac2000@hotmail.com>2018-07-28 10:56:31 -0400
commit0662793ca0050e823cd1207cc4689a1cba5068bd (patch)
tree08cd2ec59c9044c96b697b5bf8d0640841d044e0 /apps
parentb3e2bd619b1b7ea94ef29d32db48e80b347a1990 (diff)
downloadrockbox-0662793ca0050e823cd1207cc4689a1cba5068bd.tar.gz
rockbox-0662793ca0050e823cd1207cc4689a1cba5068bd.tar.bz2
rockbox-0662793ca0050e823cd1207cc4689a1cba5068bd.zip
Add cleaned-up xDuoo X3 support
Cleaned up, rebased, and forward-ported from the xvortex fork. (original credit to vsoftster@gmail.com) Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES2
-rw-r--r--apps/keymaps/keymap-xduoox3.c212
-rw-r--r--apps/menus/sound_menu.c7
-rw-r--r--apps/plugins/battery_bench.c6
-rw-r--r--apps/plugins/blackjack.c16
-rw-r--r--apps/plugins/brickmania.c10
-rw-r--r--apps/plugins/calculator.c11
-rw-r--r--apps/plugins/calendar.c10
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.h14
-rw-r--r--apps/plugins/chessclock.c10
-rw-r--r--apps/plugins/chip8.c8
-rw-r--r--apps/plugins/chopper.c4
-rw-r--r--apps/plugins/clix.c8
-rw-r--r--apps/plugins/cube.c10
-rw-r--r--apps/plugins/doom/i_video.c11
-rw-r--r--apps/plugins/fft/fft.c9
-rw-r--r--apps/plugins/flipit.c12
-rw-r--r--apps/plugins/fractals/fractal.h12
-rw-r--r--apps/plugins/goban/goban.h12
-rw-r--r--apps/plugins/greyscale.c8
-rw-r--r--apps/plugins/imageviewer/imageviewer_button.h15
-rw-r--r--apps/plugins/jewels.c10
-rw-r--r--apps/plugins/lib/keymaps.h8
-rw-r--r--apps/plugins/lib/pluginlib_actions.c15
-rw-r--r--apps/plugins/midi/midiplay.c8
-rw-r--r--apps/plugins/minesweeper.c13
-rw-r--r--apps/plugins/mp3_encoder.c6
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c10
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c9
-rw-r--r--apps/plugins/oscilloscope.c14
-rw-r--r--apps/plugins/pegbox.c17
-rw-r--r--apps/plugins/pictureflow/pictureflow.c3
-rw-r--r--apps/plugins/plugin.lds10
-rw-r--r--apps/plugins/pong.c8
-rw-r--r--apps/plugins/reversi/reversi-gui.h11
-rw-r--r--apps/plugins/rockblox.c12
-rw-r--r--apps/plugins/rockboy/rockboy.c10
-rw-r--r--apps/plugins/rockpaint.c11
-rw-r--r--apps/plugins/sliding_puzzle.c9
-rw-r--r--apps/plugins/snake.c8
-rw-r--r--apps/plugins/snake2.c9
-rw-r--r--apps/plugins/sokoban.c16
-rw-r--r--apps/plugins/solitaire.c19
-rw-r--r--apps/plugins/spacerocks.c9
-rw-r--r--apps/plugins/star.c16
-rw-r--r--apps/plugins/stopwatch.c8
-rw-r--r--apps/plugins/sudoku/sudoku.h14
-rw-r--r--apps/plugins/text_viewer/tv_button.h12
-rw-r--r--apps/plugins/vu_meter.c11
-rw-r--r--apps/plugins/wormlet.c9
-rw-r--r--apps/plugins/xobox.c9
-rw-r--r--apps/plugins/zxbox/keymaps.h8
-rw-r--r--apps/plugins/zxbox/zxbox_keyb.c9
-rw-r--r--apps/settings.h4
54 files changed, 749 insertions, 3 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index de633880f6..a84c01977f 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -317,4 +317,6 @@ keymaps/keymap-ypr1.c
keymaps/keymap-dx50.c
#elif CONFIG_KEYPAD == AGPTEK_ROCKER_PAD
keymaps/keymap-agptekrocker.c
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD
+keymaps/keymap-xduoox3.c
#endif
diff --git a/apps/keymaps/keymap-xduoox3.c b/apps/keymaps/keymap-xduoox3.c
new file mode 100644
index 0000000000..abe8507cd8
--- /dev/null
+++ b/apps/keymaps/keymap-xduoox3.c
@@ -0,0 +1,212 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2016 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 X3 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_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_MENU, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+
+ 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_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { 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_OPTION|BUTTON_REL, BUTTON_OPTION },
+ { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_WPS_MENU, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_WPS_QUICKSCREEN, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+ { ACTION_WPS_HOTKEY, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_OPTION },
+
+ 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_OPTION|BUTTON_REL, BUTTON_OPTION },
+
+ 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_OPTION|BUTTON_REL, BUTTON_OPTION },
+
+ 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_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_TREE_HOTKEY, 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/menus/sound_menu.c b/apps/menus/sound_menu.c
index 69e8e3676a..489d03bf4d 100644
--- a/apps/menus/sound_menu.c
+++ b/apps/menus/sound_menu.c
@@ -132,6 +132,10 @@ MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL);
MENUITEM_SETTING(roll_off, &global_settings.roll_off, NULL);
#endif
+#ifdef AUDIOHW_HAVE_FUNCTIONAL_MODE
+MENUITEM_SETTING(func_mode, &global_settings.func_mode, NULL);
+#endif
+
#if CONFIG_CODEC == SWCODEC
/* Crossfeed Submenu */
MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback);
@@ -256,6 +260,9 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
,&roll_off
#endif
+#ifdef AUDIOHW_HAVE_FUNCTIONAL_MODE
+ ,&func_mode
+#endif
#if CONFIG_CODEC == SWCODEC
,&crossfeed_menu, &equalizer_menu, &dithering_enabled
,&surround_menu, &pbe_menu, &afr_enabled
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index bb9c3b0e6f..9a48ef2fdb 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -279,6 +279,12 @@
#define BATTERY_OFF_TXT "Right"
#define BATTERY_ON_TXT "Left - start"
+#elif CONFIG_KEYPAD == XDUOO_X3_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 411ff3970b..6c3e487bf2 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -573,6 +573,22 @@ enum {
#define BJACK_QUIT_NAME "Volume up"
#define BJACK_DOUBLE_NAME "Option+Down"
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index 3fc30819b9..24c6fab613 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -332,6 +332,16 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_UP
#define DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index a30ccdc83d..f10bca66ec 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -525,6 +525,17 @@ F3: equal to "="
#define CALCULATOR_CALC BUTTON_VOLUP
#define CALCULATOR_CLEAR (BUTTON_SELECT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 23446beb40..74ee49904b 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -413,6 +413,16 @@
#define CALENDAR_NEXT_MONTH (BUTTON_VOLDOWN)
#define CALENDAR_PREV_MONTH (BUTTON_VOLUP)
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error "No keypad setting."
#endif
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h
index fe50297732..1f44d1b712 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -558,6 +558,20 @@
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3_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_PLAY|BUTTON_REPEAT)
+#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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index bc907feec3..ae7889ed95 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -412,6 +412,16 @@
#define CHC_SETTINGS_CANCEL BUTTON_RIGHT
#define CHC_SETTINGS_OK (BUTTON_SELECT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 5fb55ae011..153558667e 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1283,6 +1283,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_LEFT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c
index 4a838c44ae..1732a16ecb 100644
--- a/apps/plugins/chopper.c
+++ b/apps/plugins/chopper.c
@@ -209,6 +209,10 @@ CONFIG_KEYPAD == MROBE500_PAD
#define ACTION BUTTON_SELECT
#define ACTIONTEXT "Select"
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD
+#define QUIT BUTTON_POWER
+#define ACTION BUTTON_PLAY
+#define ACTIONTEXT "PLAY"
#elif !defined(HAVE_TOUCHSCREEN)
#error No keymap defined!
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c
index b47fe69952..b2580a1630 100644
--- a/apps/plugins/clix.c
+++ b/apps/plugins/clix.c
@@ -276,6 +276,14 @@
#define CLIX_BUTTON_RIGHT BUTTON_RIGHT
#define CLIX_BUTTON_CLICK BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error "no keymap"
#endif
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 04cb013f26..9a67c337d1 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -413,6 +413,16 @@
#define CUBE_HIGHSPEED (BUTTON_SELECT | BUTTON_REPEAT)
#define CUBE_PAUSE (BUTTON_LEFT | BUTTON_REPEAT)
+#elif (CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 5535f08b6e..d734e1e12b 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -555,6 +555,17 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_WEAPON BUTTON_VOLUP
#define DOOMBUTTON_MAP (BUTTON_VOLUP|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error Keymap not defined!
#endif
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index a83bd36557..e5750c109a 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -334,6 +334,15 @@ GREY_INFO_STRUCT
# define FFT_ORIENTATION BUTTON_SELECT
# define FFT_WINDOW BUTTON_VOLDOWN
+#elif (CONFIG_KEYPAD == XDUOO_X3_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 !defined(HAVE_TOUCHSCREEN)
#error No keymap defined!
#endif
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index fafc1f9c08..b089974aef 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -482,6 +482,18 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_LEFT|BUTTON_VOLUP)
#define FLIPIT_TOGGLE BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/fractals/fractal.h b/apps/plugins/fractals/fractal.h
index aa8c31f093..ed6be31695 100644
--- a/apps/plugins/fractals/fractal.h
+++ b/apps/plugins/fractals/fractal.h
@@ -484,6 +484,18 @@
#define FRACTAL_PRECISION_DEC (BUTTON_VOLUP|BUTTON_LEFT)
#define FRACTAL_RESET BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/goban/goban.h b/apps/plugins/goban/goban.h
index 135b9dbe95..d1d66e3535 100644
--- a/apps/plugins/goban/goban.h
+++ b/apps/plugins/goban/goban.h
@@ -452,6 +452,18 @@
#define GBN_BUTTON_PLAY (BUTTON_SELECT | BUTTON_REL)
#define GBN_BUTTON_NAV_MODE BUTTON_VOLUP
+#elif (CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error Unsupported keypad
#endif
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c
index 4dd29cee0b..ae873a06ac 100644
--- a/apps/plugins/greyscale.c
+++ b/apps/plugins/greyscale.c
@@ -108,6 +108,14 @@
#define GREYSCALE_RIGHT BUTTON_RIGHT
#define GREYSCALE_OFF BUTTON_PLAY
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD
+#define GREYSCALE_SHIFT BUTTON_PLAY
+#define GREYSCALE_UP BUTTON_HOME
+#define GREYSCALE_DOWN BUTTON_OPTION
+#define GREYSCALE_LEFT BUTTON_PREV
+#define GREYSCALE_RIGHT BUTTON_NEXT
+#define GREYSCALE_OFF BUTTON_POWER
+
#endif
#define GFX_HEIGHT (LCD_HEIGHT-8)
diff --git a/apps/plugins/imageviewer/imageviewer_button.h b/apps/plugins/imageviewer/imageviewer_button.h
index abd84f1710..2f349b1a24 100644
--- a/apps/plugins/imageviewer/imageviewer_button.h
+++ b/apps/plugins/imageviewer/imageviewer_button.h
@@ -495,6 +495,21 @@
#define IMGVIEW_QUIT (BUTTON_POWER|BUTTON_REL)
#define IMGVIEW_MENU (BUTTON_SELECT|BUTTON_REL)
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 97531a001c..e4a22830a1 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -377,6 +377,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define JEWELS_CANCEL BUTTON_POWER
#define HK_CANCEL "Power"
+#elif CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index 64deccf513..5fab361620 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -215,6 +215,14 @@
#define BTN_FIRE BUTTON_MENU
#define BTN_PAUSE BUTTON_POWER
+#elif (CONFIG_KEYPAD == XDUOO_X3_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_OPTION
+
#else
#error Unsupported keypad
#endif
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index f9addb32f4..2c5fb773ba 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -228,6 +228,15 @@ const struct button_mapping pla_main_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_REW|BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_FF|BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == XDUOO_X3_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 },
#else
# ifndef HAVE_TOUCHSCREEN
# error pluginlib_actions: No directions defined
@@ -447,6 +456,12 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE},
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == XDUOO_X3_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},
#else
# ifndef HAVE_TOUCHSCREEN
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c
index 418f72b6a5..de6310dcd8 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -293,6 +293,14 @@
#define MIDI_VOL_DOWN BUTTON_VOLDOWN
#define MIDI_PLAYPAUSE BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 98eb8d9e7a..2a3b5f78e9 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -404,6 +404,19 @@ CONFIG_KEYPAD == MROBE500_PAD
#elif CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD
# define MINESWP_QUIT BUTTON_POWER
+#elif (CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index e86e74f408..9e09135385 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2556,6 +2556,12 @@ CONFIG_KEYPAD == MROBE500_PAD
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD
+#define MP3ENC_PREV BUTTON_HOME
+#define MP3ENC_NEXT BUTTON_OPTION
+#define MP3ENC_DONE BUTTON_POWER
+#define MP3ENC_SELECT BUTTON_PLAY
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index dadfccf291..7976f5f542 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -306,6 +306,16 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_DOWN BUTTON_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 07cf8ba8e2..fd3e8d8cd5 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -441,6 +441,15 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_LEFT
#define MPEG_FF BUTTON_RIGHT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index 85cbf2bfb2..4534684293 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -504,6 +504,20 @@
#define OSCILLOSCOPE_VOL_UP BUTTON_VOLUP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOLDOWN
+#elif (CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index dcc6176d2b..922359cd32 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -643,6 +643,23 @@ CONFIG_KEYPAD == MROBE500_PAD
#define QUIT_TEXT "POWER"
#define SELECT_TEXT "MENU"
+#elif CONFIG_KEYPAD == XDUOO_X3_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-"
+
#else
#error Unsupported keymap!
#endif
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 6e47418e93..84a4315141 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -118,7 +118,8 @@ const struct button_mapping pf_context_buttons[] =
CONFIG_KEYPAD == GIGABEAT_PAD || CONFIG_KEYPAD == GIGABEAT_S_PAD || \
CONFIG_KEYPAD == MROBE100_PAD || CONFIG_KEYPAD == MROBE500_PAD || \
CONFIG_KEYPAD == PHILIPS_SA9200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD || \
- CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD || CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD
+ CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD || CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD || \
+ CONFIG_KEYPAD == XDUOO_X3_PAD
{PF_QUIT, BUTTON_POWER, BUTTON_NONE},
#if CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD
{PF_MENU, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT},
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 831cb59b81..aea44e7d40 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -163,8 +163,14 @@ OUTPUT_FORMAT(elf32-littlemips)
#define IRAMORIG (0x00000000 + (56*1024))
#define IRAMSIZE (200*1024)
-#elif CONFIG_CPU == JZ4732
-#define DRAMORIG 0x80004000 + STUBOFFSET
+#elif CONFIG_CPU == JZ4732 || CONFIG_CPU == JZ4760B
+#undef STUBOFFSET
+#ifdef DEBUG
+#define STUBOFFSET 0x14000
+#else
+#define STUBOFFSET 0x4000
+#endif
+#define DRAMORIG 0x80000000 + STUBOFFSET
#define IRAM DRAM
#define IRAMSIZE 0
/* The bit of IRAM that is available is used in the core */
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index 016d548675..d65134e5d2 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -309,6 +309,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_QUIT BUTTON_POWER
#define PONG_PAUSE BUTTON_MENU
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h
index 67897a9772..1dc1dedbed 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -328,6 +328,17 @@
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
#define REVERSI_BUTTON_MENU BUTTON_POWER
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index a0814beda1..b204ed87da 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -480,6 +480,18 @@
#define ROCKBLOX_ROTATE_CCW BUTTON_VOLDOWN
#define ROCKBLOX_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 38536d1375..7425fc2550 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -423,6 +423,16 @@ static void setoptions (void)
options.A = BUTTON_VOLDOWN;
options.B = BUTTON_VOLUP;
+#elif CONFIG_KEYPAD == XDUOO_X3_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;
+
#else
#error No Keymap Defined!
#endif
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index d2534f4aa6..d0f9f7235c 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -327,6 +327,17 @@
#define ROCKPAINT_QUIT BUTTON_POWER
#define ROCKPAINT_MENU BUTTON_MENU
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD
+#define ROCKPAINT_QUIT BUTTON_POWER
+#define ROCKPAINT_DRAW BUTTON_PLAY
+#define ROCKPAINT_MENU (BUTTON_HOME | BUTTON_POWER)
+#define ROCKPAINT_TOOLBAR BUTTON_VOL_UP
+#define ROCKPAINT_TOOLBAR2 BUTTON_VOL_DOWN
+#define ROCKPAINT_UP BUTTON_HOME
+#define ROCKPAINT_DOWN BUTTON_OPTION
+#define ROCKPAINT_LEFT BUTTON_PREV
+#define ROCKPAINT_RIGHT BUTTON_NEXT
+
#else
#error "Please define keys for this keypad"
#endif
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index d43c3d527f..a3f84e32ae 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -331,6 +331,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE BUTTON_POWER
#define PUZZLE_PICTURE BUTTON_SELECT
+#elif (CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index a73e61d9ec..9144edf062 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -289,6 +289,14 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_DOWN BUTTON_DOWN
#define SNAKE_PLAYPAUSE BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index f32012e029..13d2c57b24 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -419,6 +419,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_SELECT
#define SNAKE2_PLAYPAUSE_TEXT "Select"
+#elif (CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index af369f82a6..98d295eb1a 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -651,6 +651,22 @@
#define SOKOBAN_MENU BUTTON_MENU
#define SOKOBAN_MENU_NAME "[MENU]"
+#elif CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index ee3742472b..fe7da2788e 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -687,6 +687,25 @@ CONFIG_KEYPAD == MROBE500_PAD
#elif CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD
# define SOL_QUIT BUTTON_POWER
+#elif CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c
index 7a22de814b..ad03919861 100644
--- a/apps/plugins/spacerocks.c
+++ b/apps/plugins/spacerocks.c
@@ -354,6 +354,15 @@
#define AST_RIGHT BUTTON_RIGHT
#define AST_FIRE BUTTON_SELECT
+#elif (CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 6d0cd65e20..bcddab8f20 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -623,6 +623,22 @@
#define STAR_TOGGLE_CONTROL_NAME "Play"
#define STAR_QUIT_NAME "Back"
+#elif CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index 8d99178e48..69f14a20ef 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -313,6 +313,14 @@
#define STOPWATCH_SCROLL_UP BUTTON_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 8d871c7b2d..e26644a2d8 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -423,6 +423,20 @@
#define SUDOKU_BUTTON_TOGGLE BUTTON_SELECT
#define SUDOKU_BUTTON_POSSIBLE BUTTON_VOLUP
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/text_viewer/tv_button.h b/apps/plugins/text_viewer/tv_button.h
index 9d1b5afa88..58bce80eaf 100644
--- a/apps/plugins/text_viewer/tv_button.h
+++ b/apps/plugins/text_viewer/tv_button.h
@@ -550,6 +550,18 @@
#define TV_AUTOSCROLL BUTTON_VOLDOWN
#define TV_BOOKMARK BUTTON_VOLUP
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 8c80066c67..04876ba198 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -421,6 +421,17 @@
#define LABEL_VOLUME "Vol Up/Down"
#define LABEL_MENU "Select"
+#elif (CONFIG_KEYPAD == XDUOO_X3_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"
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index f1ccaec782..83cfadc338 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -393,6 +393,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET (BUTTON_SELECT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == XDUOO_X3_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)
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index f5c4a29bdf..9b41e2d1ac 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -342,6 +342,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_DOWN
#define PAUSE BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error No keymap defined!
#endif
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index d10eeb67e7..ebdd41734e 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -282,6 +282,14 @@
#define ZX_RIGHT BUTTON_RIGHT
#define ZX_SELECT BUTTON_SELECT
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#else
#error Keymap not defined!
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index 2931c8ea32..f38712d8d1 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -278,6 +278,15 @@
#define KBD_UP BUTTON_UP
#define KBD_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == XDUOO_X3_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
+
#endif
#ifdef HAVE_TOUCHSCREEN
diff --git a/apps/settings.h b/apps/settings.h
index 411675153a..8d8c766d45 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -811,6 +811,10 @@ struct user_settings
int roll_off;
#endif
+#ifdef AUDIOHW_HAVE_FUNCTIONAL_MODE
+ int func_mode;
+#endif
+
#ifdef AUDIOHW_HAVE_EQ
/** Hardware EQ tone controls **/
struct hw_eq_band