summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-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.c5
-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/imageviewer/imageviewer_button.h15
-rw-r--r--apps/plugins/invadrox.c7
-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.c5
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c10
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c9
-rw-r--r--apps/plugins/oscilloscope.c13
-rw-r--r--apps/plugins/pacbox/pacbox.h8
-rw-r--r--apps/plugins/pegbox.c17
-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.c33
-rw-r--r--apps/plugins/sliding_puzzle.c8
-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
49 files changed, 541 insertions, 0 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index ff979abd8e..f68e3ed5a3 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -281,6 +281,12 @@
#define BATTERY_ON_TXT "Play - start"
#define BATTERY_OFF_TXT "POWER"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 93b577462b..b2e0383187 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -591,6 +591,22 @@ enum {
#define BJACK_RIGHT BUTTON_NEXT
#define BJACK_LEFT BUTTON_PREV
+#elif CONFIG_KEYPAD == FIIO_M3K_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 5764c6869d..4452f23357 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -337,6 +337,16 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_HOME
#define DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == FIIO_M3K_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 ac5a6ed7cd..f02f99ee0d 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -526,6 +526,17 @@ F3: equal to "="
#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 7e2472ffc9..89dcc61714 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -411,6 +411,16 @@
#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
+#elif CONFIG_KEYPAD == FIIO_M3K_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 ab0adbb706..567dcb1acb 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -553,6 +553,20 @@
#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 649ab164d0..aee9c9f8e7 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -396,6 +396,16 @@
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANCEL BUTTON_POWER
+#elif CONFIG_KEYPAD == FIIO_M3K_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 cb7b85786f..bbea442d8e 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1275,6 +1275,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_NEXT
#define CHIP8_KEY8 BUTTON_OPTION
+#elif CONFIG_KEYPAD == FIIO_M3K_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 37fed5dd01..6e9f923460 100644
--- a/apps/plugins/chopper.c
+++ b/apps/plugins/chopper.c
@@ -213,6 +213,11 @@ CONFIG_KEYPAD == MROBE500_PAD
#define ACTION BUTTON_PLAY
#define ACTIONTEXT "PLAY"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 748090358c..d6b28b54b9 100644
--- a/apps/plugins/clix.c
+++ b/apps/plugins/clix.c
@@ -300,6 +300,14 @@
#define CLIX_BUTTON_RIGHT BUTTON_NEXT
#define CLIX_BUTTON_CLICK BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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 d2d831f81b..87ab5c1102 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -400,6 +400,16 @@
#define CUBE_PAUSE BUTTON_HOME
#define CUBE_HIGHSPEED BUTTON_PLAY
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 fb328639bf..cd3cd90edd 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -588,6 +588,17 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_ENTER BUTTON_PLAY
#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
+#elif CONFIG_KEYPAD == FIIO_M3K_PAD
+#define DOOMBUTTON_UP BUTTON_UP
+#define DOOMBUTTON_DOWN BUTTON_DOWN
+#define DOOMBUTTON_LEFT BUTTON_PREV
+#define DOOMBUTTON_RIGHT BUTTON_NEXT
+#define DOOMBUTTON_SHOOT BUTTON_PLAY
+#define DOOMBUTTON_OPEN BUTTON_OPTION
+#define DOOMBUTTON_ESC BUTTON_HOME
+#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 2ed0263d75..eeb6611488 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -352,6 +352,15 @@ GREY_INFO_STRUCT
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 91d83e9291..4fe0681417 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -472,6 +472,18 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
#define FLIPIT_TOGGLE BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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 92a0b87c48..45de45c5cd 100644
--- a/apps/plugins/fractals/fractal.h
+++ b/apps/plugins/fractals/fractal.h
@@ -482,6 +482,18 @@
#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 ac02d74f50..c6a10e3944 100644
--- a/apps/plugins/goban/goban.h
+++ b/apps/plugins/goban/goban.h
@@ -467,6 +467,18 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 7aa96023c6..e637a09ca9 100644
--- a/apps/plugins/imageviewer/imageviewer_button.h
+++ b/apps/plugins/imageviewer/imageviewer_button.h
@@ -506,6 +506,21 @@
#define IMGVIEW_MENU BUTTON_POWER
#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 e275129d27..5e3cb12163 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -282,6 +282,13 @@ CONFIG_KEYPAD == MROBE500_PAD
#define RIGHT BUTTON_VOL_DOWN
#define FIRE BUTTON_VOL_UP
+#elif CONFIG_KEYPAD == FIIO_M3K_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 f94825650f..64a15ff4fc 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -377,6 +377,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define HK_SELECT "PLAY"
#define HK_CANCEL "POWER"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 e3de03f222..2865f9cdd7 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -239,6 +239,14 @@
#define BTN_FIRE BUTTON_PLAY
#define BTN_PAUSE BUTTON_POWER
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 c580074d5e..480dc446cb 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -233,6 +233,15 @@ 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 == FIIO_M3K_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 },
@@ -464,6 +473,12 @@ 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 == FIIO_M3K_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 e6e2b4bf51..e34cedde21 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -317,6 +317,14 @@
#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
#define MIDI_PLAYPAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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 01659dbfd2..5872973a45 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -408,6 +408,19 @@ CONFIG_KEYPAD == MROBE500_PAD
# define MINESWP_DISCOVER2 BUTTON_VOL_UP
# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 3b912ba606..0368edbc88 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2574,6 +2574,11 @@ CONFIG_KEYPAD == MROBE500_PAD
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 25eb313591..43143bdaee 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -336,6 +336,16 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
+#elif CONFIG_KEYPAD == FIIO_M3K_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 5c06fe257d..8028913c94 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -468,6 +468,15 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_PREV
#define MPEG_FF BUTTON_NEXT
+#elif CONFIG_KEYPAD == FIIO_M3K_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 4fd1883f82..2cf9b96409 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -512,6 +512,19 @@
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#define NEED_LASTBUTTON
+#elif (CONFIG_KEYPAD == FIIO_M3K_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
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index 78a171467a..a687806d96 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -382,6 +382,14 @@
#define PACMAN_1UP BUTTON_VOL_UP
#define PACMAN_COIN BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index 0a299c995f..5f947fe5f2 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -660,6 +660,23 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 a000a88fe7..41525f3ffe 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -309,6 +309,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_RIGHT_UP BUTTON_HOME
#define PONG_RIGHT_DOWN BUTTON_NEXT
+#elif CONFIG_KEYPAD == FIIO_M3K_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 ceeabeebc8..1547e52573 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -341,6 +341,17 @@
#define REVERSI_BUTTON_MENU BUTTON_PLAY
#define REVERSI_BUTTON_MENU_LONGPRESS
+#elif CONFIG_KEYPAD == FIIO_M3K_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 f1f260a55d..ec6d892a0b 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -467,6 +467,18 @@
#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 29269f18fb..c96946cf7d 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -445,6 +445,16 @@ static void setoptions (void)
options.SELECT = BUTTON_VOL_UP;
options.MENU = BUTTON_POWER;
+#elif CONFIG_KEYPAD == FIIO_M3K_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/rockpaint.c b/apps/plugins/rockpaint.c
index 8e4df10280..f28fbdf622 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -338,6 +338,39 @@
#define ROCKPAINT_LEFT BUTTON_PREV
#define ROCKPAINT_RIGHT BUTTON_NEXT
+#elif CONFIG_KEYPAD == XDUOO_X3II_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
+
+#elif CONFIG_KEYPAD == XDUOO_X20_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
+
+#elif CONFIG_KEYPAD == FIIO_M3K_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
+
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define ROCKPAINT_QUIT BUTTON_POWER
#define ROCKPAINT_DRAW BUTTON_PLAY
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index e8d349defd..7683016066 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -330,6 +330,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == FIIO_M3K_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
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index 4471cd12a6..ebfb39c9a7 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_OPTION
#define SNAKE_PLAYPAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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 bfff0bf870..77400dfff1 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -419,6 +419,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 08359d9fcc..da3c303ace 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -663,6 +663,22 @@
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 a7844fba92..1996dc97e7 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -684,6 +684,25 @@ CONFIG_KEYPAD == MROBE500_PAD
# define HK_CUR2STACK "DBL PLAY"
# define HK_REM2STACK "NEXT"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 b366da0d60..1b3bdda0d1 100644
--- a/apps/plugins/spacerocks.c
+++ b/apps/plugins/spacerocks.c
@@ -354,6 +354,15 @@
#define AST_RIGHT BUTTON_NEXT
#define AST_FIRE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 ea1d5b8bf8..cf8522fbac 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -620,6 +620,22 @@
#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
+#elif CONFIG_KEYPAD == FIIO_M3K_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 6fca37d06f..801c735f00 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -301,6 +301,14 @@
#define STOPWATCH_SCROLL_UP BUTTON_HOME
#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == FIIO_M3K_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 434223ef68..749087260d 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -432,6 +432,20 @@
#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 6fcfc24e4f..dea87ebd52 100644
--- a/apps/plugins/text_viewer/tv_button.h
+++ b/apps/plugins/text_viewer/tv_button.h
@@ -533,6 +533,18 @@
#define TV_LINE_DOWN BUTTON_OPTION
#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 d2ba8c992c..66ddf03dd8 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -419,6 +419,17 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
+#elif (CONFIG_KEYPAD == FIIO_M3K_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 59f3138c0a..6cf03dfaff 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -380,6 +380,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
+#elif CONFIG_KEYPAD == FIIO_M3K_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 5ed1fbb612..94161c683d 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -342,6 +342,15 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_OPTION
#define PAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == FIIO_M3K_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 967b979883..eae20e7976 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -282,6 +282,14 @@
#define ZX_UP BUTTON_HOME
#define ZX_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == FIIO_M3K_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 4dc50e2ae8..c16c3cd20a 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -275,6 +275,15 @@
#define KBD_UP BUTTON_HOME
#define KBD_DOWN BUTTON_OPTION
+#elif CONFIG_KEYPAD == FIIO_M3K_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