summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-01-18 11:09:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-01-18 11:09:06 +0000
commitcedba8830fd015e9a61b7a772927fefe565f7b41 (patch)
treee33e1b1ff14904098534a7e78d71ba672fcb78e0 /apps/plugins
parent205be712fe6ad03f194216bc0f936f1b5917eafd (diff)
downloadrockbox-cedba8830fd015e9a61b7a772927fefe565f7b41.tar.gz
rockbox-cedba8830fd015e9a61b7a772927fefe565f7b41.tar.bz2
rockbox-cedba8830fd015e9a61b7a772927fefe565f7b41.zip
Matt v.d. Westhuizen's iAudio X5 keypad adjustments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8366 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/battery_test.c2
-rw-r--r--apps/plugins/calculator.c10
-rw-r--r--apps/plugins/chessclock.c10
-rw-r--r--apps/plugins/chip8.c8
-rw-r--r--apps/plugins/cube.c13
-rw-r--r--apps/plugins/databox/databox.c3
-rw-r--r--apps/plugins/demystify.c6
-rw-r--r--apps/plugins/dict.c2
-rw-r--r--apps/plugins/flipit.c11
-rw-r--r--apps/plugins/jewels.c10
-rw-r--r--apps/plugins/logo.c6
-rw-r--r--apps/plugins/minesweeper.c9
-rw-r--r--apps/plugins/mosaique.c5
-rw-r--r--apps/plugins/mp3_encoder.c5
-rw-r--r--apps/plugins/pong.c7
-rw-r--r--apps/plugins/rockblox.c6
-rw-r--r--apps/plugins/sliding_puzzle.c7
-rw-r--r--apps/plugins/snake.c6
-rw-r--r--apps/plugins/snake2.c10
-rw-r--r--apps/plugins/snow.c2
-rw-r--r--apps/plugins/sokoban.c10
-rw-r--r--apps/plugins/solitaire.c47
-rw-r--r--apps/plugins/star.c12
-rw-r--r--apps/plugins/starfield.c6
-rw-r--r--apps/plugins/stats.c2
-rw-r--r--apps/plugins/stopwatch.c7
-rw-r--r--apps/plugins/sudoku.c7
-rw-r--r--apps/plugins/viewer.c11
28 files changed, 227 insertions, 13 deletions
diff --git a/apps/plugins/battery_test.c b/apps/plugins/battery_test.c
index c076ad74e8..31a2ac582c 100644
--- a/apps/plugins/battery_test.c
+++ b/apps/plugins/battery_test.c
@@ -45,6 +45,8 @@ PLUGIN_HEADER
#define BATTERY_TEST_QUIT BUTTON_PLAY
#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
#define BATTERY_TEST_QUIT BUTTON_MENU
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define BATTERY_TEST_QUIT BUTTON_POWER
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index ba18cc1c55..2584062fd7 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -143,6 +143,16 @@ PLUGIN_HEADER
#define CALCULATOR_INPUT (BUTTON_SELECT | BUTTON_REL)
#define CALCULATOR_CALC (BUTTON_PLAY | BUTTON_REPEAT)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+
+#define CALCULATOR_UP BUTTON_UP
+#define CALCULATOR_DOWN BUTTON_DOWN
+#define CALCULATOR_QUIT BUTTON_POWER
+#define CALCULATOR_INPUT_CALC_PRE BUTTON_MENU
+#define CALCULATOR_INPUT (BUTTON_MENU | BUTTON_REL)
+#define CALCULATOR_CALC BUTTON_PLAY
+#define CALCULATOR_CLEAR BUTTON_REC
+
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 73f53c9205..6f1837ca2b 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -86,6 +86,16 @@ PLUGIN_HEADER
#define CHC_SETTINGS_OK BUTTON_SELECT
#define CHC_SETTINGS_CANCEL BUTTON_PLAY
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define CHC_QUIT BUTTON_REC
+#define CHC_STARTSTOP BUTTON_PLAY
+#define CHC_RESET BUTTON_POWER
+#define CHC_MENU BUTTON_MENU
+#define CHC_SETTINGS_INC BUTTON_RIGHT
+#define CHC_SETTINGS_DEC BUTTON_LEFT
+#define CHC_SETTINGS_OK BUTTON_MENU
+#define CHC_SETTINGS_CANCEL BUTTON_REC
+
#endif
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 50e32ed90b..66a2bfd70e 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -984,6 +984,14 @@ STATIC void chip8 (void)
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_SCROLL_FWD
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define CHIP8_OFF BUTTON_POWER
+#define CHIP8_KEY2 BUTTON_UP
+#define CHIP8_KEY4 BUTTON_LEFT
+#define CHIP8_KEY5 BUTTON_MENU
+#define CHIP8_KEY6 BUTTON_RIGHT
+#define CHIP8_KEY8 BUTTON_DOWN
+
#endif
static byte chip8_virtual_keys[16];
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index a70e3322e0..378e39003c 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -106,6 +106,19 @@ PLUGIN_HEADER
#define CUBE_PAUSE (BUTTON_SELECT | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_MODE | BUTTON_EQ) /* TODO: this is impossible */
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define CUBE_QUIT BUTTON_POWER
+#define CUBE_X_INC BUTTON_LEFT
+#define CUBE_X_DEC BUTTON_RIGHT
+#define CUBE_Y_INC BUTTON_UP
+#define CUBE_Y_DEC BUTTON_DOWN
+#define CUBE_Z_INC (BUTTON_PLAY | BUTTON_UP)
+#define CUBE_Z_DEC (BUTTON_PLAY | BUTTON_DOWN)
+#define CUBE_MODE BUTTON_MENU
+#define CUBE_PAUSE_PRE BUTTON_PLAY
+#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL)
+#define CUBE_HIGHSPEED (BUTTON_REC | BUTTON_REL)
+
#endif
#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c
index 2cc78a0b01..996134d37d 100644
--- a/apps/plugins/databox/databox.c
+++ b/apps/plugins/databox/databox.c
@@ -40,6 +40,9 @@ PLUGIN_HEADER
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define DBX_SELECT BUTTON_SELECT
#define DBX_STOP BUTTON_PLAY
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define DBX_SELECT BUTTON_MENU
+#define DBX_STOP BUTTON_PLAY
#endif
#define MAX_TOKENS 70
diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c
index f4e54becb8..da7cd6eb96 100644
--- a/apps/plugins/demystify.c
+++ b/apps/plugins/demystify.c
@@ -32,6 +32,12 @@ PLUGIN_HEADER
#define DEMYSTIFY_REMOVE_POLYGON BUTTON_LEFT
#define DEMYSTIFY_INCREASE_SPEED BUTTON_SCROLL_FWD
#define DEMYSTIFY_DECREASE_SPEED BUTTON_SCROLL_BACK
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define DEMYSTIFY_QUIT BUTTON_POWER
+#define DEMYSTIFY_ADD_POLYGON BUTTON_RIGHT
+#define DEMYSTIFY_REMOVE_POLYGON BUTTON_LEFT
+#define DEMYSTIFY_INCREASE_SPEED BUTTON_UP
+#define DEMYSTIFY_DECREASE_SPEED BUTTON_DOWN
#else
#define DEMYSTIFY_QUIT BUTTON_OFF
#define DEMYSTIFY_ADD_POLYGON BUTTON_UP
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index 7209240128..30ba2f442b 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -108,6 +108,8 @@ long reverse (long N) {
#define LP_QUIT BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define LP_QUIT BUTTON_PLAY
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define LP_QUIT BUTTON_POWER
#else
#define LP_QUIT BUTTON_OFF
#endif
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index f1fba878e3..13efac18a1 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -63,6 +63,17 @@ PLUGIN_HEADER
#define FLIPIT_TOGGLE_PRE BUTTON_SELECT
#define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+
+#define FLIPIT_UP BUTTON_UP
+#define FLIPIT_DOWN BUTTON_DOWN
+#define FLIPIT_QUIT BUTTON_POWER
+#define FLIPIT_SHUFFLE (BUTTON_PLAY | BUTTON_LEFT)
+#define FLIPIT_SOLVE (BUTTON_PLAY | BUTTON_RIGHT)
+#define FLIPIT_STEP_BY_STEP (BUTTON_PLAY | BUTTON_UP)
+#define FLIPIT_TOGGLE_PRE BUTTON_MENU
+#define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL)
+
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index a4ce1ae92a..265149f410 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -87,6 +87,16 @@ PLUGIN_HEADER
#define BEJEWELED_SELECT BUTTON_SELECT
#define BEJEWELED_RESUME BUTTON_EQ
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define BEJEWELED_UP BUTTON_UP
+#define BEJEWELED_DOWN BUTTON_DOWN
+#define BEJEWELED_LEFT BUTTON_LEFT
+#define BEJEWELED_RIGHT BUTTON_RIGHT
+#define BEJEWELED_QUIT BUTTON_POWER
+#define BEJEWELED_START BUTTON_PLAY
+#define BEJEWELED_SELECT BUTTON_MENU
+#define BEJEWELED_RESUME BUTTON_REC
+
#else
#error BEJEWELED: Unsupported keypad
#endif
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 01678596f0..c94136d0df 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -195,6 +195,12 @@ const unsigned char rockbox16x7[] = {
#define LP_INC_X BUTTON_RIGHT
#define LP_DEC_Y BUTTON_DOWN
#define LP_INC_Y BUTTON_UP
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define LP_QUIT BUTTON_MENU
+#define LP_DEC_X BUTTON_LEFT
+#define LP_INC_X BUTTON_RIGHT
+#define LP_DEC_Y BUTTON_DOWN
+#define LP_INC_Y BUTTON_UP
#else
#define LP_QUIT BUTTON_OFF
#define LP_DEC_X BUTTON_LEFT
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 5baaea6812..b6a6172f51 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -80,6 +80,15 @@ PLUGIN_HEADER
#define MINESWP_DISCOVER (BUTTON_SELECT | BUTTON_PLAY)
#define MINESWP_INFO (BUTTON_SELECT | BUTTON_MENU)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define MINESWP_UP BUTTON_UP
+#define MINESWP_DOWN BUTTON_DOWN
+#define MINESWP_QUIT BUTTON_POWER
+#define MINESWP_START BUTTON_REC
+#define MINESWP_TOGGLE BUTTON_PLAY
+#define MINESWP_DISCOVER BUTTON_MENU
+#define MINESWP_INFO (BUTTON_REC | BUTTON_PLAY)
+
#endif
/* here is a global api struct pointer. while not strictly necessary,
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index bccc436cad..56c6a18921 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -63,6 +63,11 @@ PLUGIN_HEADER
#define MOSAIQUE_SPEED BUTTON_MODE
#define MOSAIQUE_RESTART BUTTON_SELECT
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define MOSAIQUE_QUIT BUTTON_POWER
+#define MOSAIQUE_SPEED BUTTON_MENU
+#define MOSAIQUE_RESTART BUTTON_PLAY
+
#endif
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 2fce02c705..6e3a6e375e 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -1885,6 +1885,11 @@ char *get_mp3_filename(char *wav_name)
#define MP3ENC_NEXT BUTTON_SCROLL_FWD
#define MP3ENC_DONE BUTTON_MENU
#define MP3ENC_SELECT BUTTON_SELECT
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define MP3ENC_PREV BUTTON_UP
+#define MP3ENC_NEXT BUTTON_DOWN
+#define MP3ENC_DONE BUTTON_POWER
+#define MP3ENC_SELECT BUTTON_MENU
#endif
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index 4e9d99b8f0..b725c9305a 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -65,6 +65,13 @@ PLUGIN_HEADER
#define PONG_RIGHT_UP BUTTON_RIGHT
#define PONG_RIGHT_DOWN BUTTON_PLAY
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define PONG_QUIT BUTTON_POWER
+#define PONG_LEFT_UP BUTTON_UP
+#define PONG_LEFT_DOWN BUTTON_DOWN
+#define PONG_RIGHT_UP BUTTON_REC
+#define PONG_RIGHT_DOWN BUTTON_PLAY
+
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index f30a21aff8..0c976369cf 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -30,6 +30,12 @@ PLUGIN_HEADER
#define ROCKBLOX_DOWN BUTTON_SCROLL_FWD
#define ROCKBLOX_LEFT BUTTON_LEFT
#define ROCKBLOX_RIGHT BUTTON_RIGHT
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define ROCKBLOX_OFF BUTTON_POWER
+#define ROCKBLOX_UP BUTTON_UP
+#define ROCKBLOX_DOWN BUTTON_DOWN
+#define ROCKBLOX_LEFT BUTTON_LEFT
+#define ROCKBLOX_RIGHT BUTTON_RIGHT
#else
#define ROCKBLOX_OFF BUTTON_OFF
#define ROCKBLOX_UP BUTTON_UP
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 060ab1866a..2e4a221930 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -52,6 +52,13 @@ PLUGIN_HEADER
#define PUZZLE_SHUFFLE BUTTON_SELECT
#define PUZZLE_PICTURE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define PUZZLE_QUIT BUTTON_POWER
+#define PUZZLE_UP BUTTON_UP
+#define PUZZLE_DOWN BUTTON_DOWN
+#define PUZZLE_SHUFFLE BUTTON_REC
+#define PUZZLE_PICTURE BUTTON_PLAY
+
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index dc78f17820..04a4f3e0e2 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -61,6 +61,12 @@ PLUGIN_HEADER
#define SNAKE_DOWN BUTTON_PLAY
#define SNAKE_PLAYPAUSE BUTTON_SELECT
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define SNAKE_QUIT BUTTON_POWER
+#define SNAKE_UP BUTTON_UP
+#define SNAKE_DOWN BUTTON_DOWN
+#define SNAKE_PLAYPAUSE BUTTON_PLAY
+
#else
#error "lacks keymapping"
#endif
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 4008209578..dbb6bbc6dd 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -103,6 +103,16 @@ PLUGIN_HEADER
#define SNAKE2_SELECT_TYPE BUTTON_RIGHT
#define SNAKE2_PLAYPAUSE BUTTON_SELECT
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define SNAKE2_UP BUTTON_UP
+#define SNAKE2_DOWN BUTTON_DOWN
+#define SNAKE2_QUIT BUTTON_POWER
+#define SNAKE2_LEVEL_UP BUTTON_REC
+#define SNAKE2_LEVEL_DOWN BUTTON_PLAY
+#define SNAKE2_SELECT_MAZE BUTTON_LEFT
+#define SNAKE2_SELECT_TYPE BUTTON_RIGHT
+#define SNAKE2_PLAYPAUSE BUTTON_MENU
+
#else
#error "lacks keymapping"
#endif
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index a1405a1863..c1487a8009 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -40,6 +40,8 @@ PLUGIN_HEADER
#define SNOW_QUIT BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define SNOW_QUIT BUTTON_PLAY
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define SNOW_QUIT BUTTON_POWER
#else
#define SNOW_QUIT BUTTON_OFF
#endif
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 994a1172c8..e823518ddb 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -75,6 +75,16 @@ PLUGIN_HEADER
#define SOKOBAN_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT)
#define SOKOBAN_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define SOKOBAN_UP BUTTON_UP
+#define SOKOBAN_DOWN BUTTON_DOWN
+#define SOKOBAN_QUIT BUTTON_POWER
+#define SOKOBAN_UNDO_PRE BUTTON_MENU
+#define SOKOBAN_UNDO (BUTTON_MENU | BUTTON_REL)
+#define SOKOBAN_LEVEL_UP (BUTTON_PLAY | BUTTON_UP)
+#define SOKOBAN_LEVEL_DOWN (BUTTON_PLAY | BUTTON_DOWN)
+#define SOKOBAN_LEVEL_REPEAT BUTTON_REC
+
#endif
#if LCD_DEPTH > 1
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 9a60635f45..33ac536267 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -109,19 +109,33 @@ static struct plugin_api* rb;
#define SOL_OPT BUTTON_ON
#define SOL_REM BUTTON_REC
-#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
-#define SOL_QUIT (BUTTON_SELECT | BUTTON_MENU)
-#define SOL_UP BUTTON_MENU
-#define SOL_DOWN BUTTON_PLAY
-#define SOL_LEFT BUTTON_LEFT
-#define SOL_RIGHT BUTTON_RIGHT
-#define SOL_MOVE BUTTON_SELECT
-#define SOL_DRAW (BUTTON_SELECT | BUTTON_PLAY)
-#define SOL_REM2CUR (BUTTON_SELECT | BUTTON_LEFT)
-#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_RIGHT)
-#define SOL_REM2STACK (BUTTON_LEFT | BUTTON_RIGHT)
-#define SOL_MENU_RUN BUTTON_SELECT
-#define SOL_MENU_INFO (BUTTON_PLAY | BUTTON_MENU)
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
+#define SOL_QUIT (BUTTON_SELECT | BUTTON_MENU)
+#define SOL_UP BUTTON_MENU
+#define SOL_DOWN BUTTON_PLAY
+#define SOL_LEFT BUTTON_LEFT
+#define SOL_RIGHT BUTTON_RIGHT
+#define SOL_MOVE BUTTON_SELECT
+#define SOL_DRAW (BUTTON_SELECT | BUTTON_PLAY)
+#define SOL_REM2CUR (BUTTON_SELECT | BUTTON_LEFT)
+#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_RIGHT)
+#define SOL_REM2STACK (BUTTON_LEFT | BUTTON_RIGHT)
+#define SOL_MENU_RUN BUTTON_SELECT
+#define SOL_MENU_INFO (BUTTON_PLAY | BUTTON_MENU)
+
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define SOL_QUIT BUTTON_POWER
+#define SOL_UP BUTTON_UP
+#define SOL_DOWN BUTTON_DOWN
+#define SOL_LEFT BUTTON_LEFT
+#define SOL_RIGHT BUTTON_RIGHT
+#define SOL_MOVE BUTTON_MENU
+#define SOL_DRAW BUTTON_PLAY
+#define SOL_REM2CUR (BUTTON_REC | BUTTON_LEFT)
+#define SOL_CUR2STACK (BUTTON_REC | BUTTON_UP)
+#define SOL_REM2STACK (BUTTON_REC | BUTTON_DOWN)
+#define SOL_MENU_RUN BUTTON_MENU
+#define SOL_MENU_INFO BUTTON_PLAY
#endif
@@ -160,6 +174,13 @@ static struct plugin_api* rb;
#define HELP_SOL_REM2CUR "SELECT+LEFT: Put the card on top of the remains' stack on top of the cursor."
#define HELP_SOL_CUR2STACK "SELECT+RIGHT..: Put the card under the cursor on one of the 4 final stacks."
#define HELP_SOL_REM2STACK "LEFT+RIGHT: Put the card on top of the remains' stack on one of the 4 final stacks."
+
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define HELP_SOL_MOVE "MENU: Select cards, Move cards, reveal hidden cards ..."
+#define HELP_SOL_DRAW "PLAY: Un-select a card if it was selected. Else, draw 3 new cards out of the remains' stack."
+#define HELP_SOL_REM2CUR "REC+LEFT: Put the card on top of the remains' stack on top of the cursor."
+#define HELP_SOL_CUR2STACK "REC+UP..: Put the card under the cursor on one of the 4 final stacks."
+#define HELP_SOL_REM2STACK "REC+DOWN: Put the card on top of the remains' stack on one of the 4 final stacks."
#endif
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 03dac3482c..ddacfbcae2 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -110,6 +110,18 @@ PLUGIN_HEADER
#define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY)
#define STAR_MENU_RUN BUTTON_RIGHT
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+
+#define STAR_QUIT BUTTON_POWER
+#define STAR_UP BUTTON_UP
+#define STAR_DOWN BUTTON_DOWN
+#define STAR_TOGGLE_CONTROL_PRE BUTTON_MENU
+#define STAR_TOGGLE_CONTROL (BUTTON_MENU | BUTTON_REL)
+#define STAR_LEVEL_UP (BUTTON_PLAY | BUTTON_UP)
+#define STAR_LEVEL_DOWN (BUTTON_PLAY | BUTTON_DOWN)
+#define STAR_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_RIGHT)
+#define STAR_MENU_RUN BUTTON_REC
+
#endif
/* function returns because of USB? */
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 750c59fe41..f72c1ce5a9 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -32,6 +32,12 @@ static struct plugin_api* rb; /* global api struct pointer */
#define STARFIELD_DECREASE_ZMOVE BUTTON_SCROLL_BACK
#define STARFIELD_INCREASE_NB_STARS BUTTON_RIGHT
#define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define STARFIELD_QUIT BUTTON_POWER
+#define STARFIELD_INCREASE_ZMOVE BUTTON_UP
+#define STARFIELD_DECREASE_ZMOVE BUTTON_DOWN
+#define STARFIELD_INCREASE_NB_STARS BUTTON_RIGHT
+#define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT
#else
#define STARFIELD_QUIT BUTTON_OFF
#define STARFIELD_INCREASE_ZMOVE BUTTON_UP
diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c
index b54adb584b..718b3ec928 100644
--- a/apps/plugins/stats.c
+++ b/apps/plugins/stats.c
@@ -34,6 +34,8 @@ static int fontwidth, fontheight;
#define STATS_STOP BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define STATS_STOP BUTTON_PLAY
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define STATS_STOP BUTTON_POWER
#else
#define STATS_STOP BUTTON_OFF
#endif
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index 3742a9a552..bccca7ea36 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -77,6 +77,13 @@ PLUGIN_HEADER
#define STOPWATCH_LAP_TIMER BUTTON_SELECT
#define STOPWATCH_SCROLL_UP BUTTON_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define STOPWATCH_QUIT BUTTON_POWER
+#define STOPWATCH_START_STOP BUTTON_PLAY
+#define STOPWATCH_RESET_TIMER BUTTON_REC
+#define STOPWATCH_LAP_TIMER BUTTON_MENU
+#define STOPWATCH_SCROLL_UP BUTTON_UP
+#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/sudoku.c b/apps/plugins/sudoku.c
index 94ff96d171..b6df4e1235 100644
--- a/apps/plugins/sudoku.c
+++ b/apps/plugins/sudoku.c
@@ -103,6 +103,13 @@ PLUGIN_HEADER
#define SUDOKU_BUTTON_MENU BUTTON_MENU
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_SELECT | BUTTON_LEFT)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define SUDOKU_BUTTON_QUIT BUTTON_POWER
+#define SUDOKU_BUTTON_UP BUTTON_UP
+#define SUDOKU_BUTTON_DOWN BUTTON_DOWN
+#define SUDOKU_BUTTON_TOGGLE BUTTON_MENU
+#define SUDOKU_BUTTON_MENU BUTTON_PLAY
+#define SUDOKU_BUTTON_POSSIBLE BUTTON_REC
#elif
#error SUDOKU: Unsupported keypad
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index b98605af84..a1de3f9017 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -140,6 +140,17 @@ PLUGIN_HEADER
#define VIEWER_MODE_LINE (BUTTON_EQ | BUTTON_REPEAT)
#define VIEWER_MODE_WIDTH BUTTON_MODE
+/* iAudio X5 keys */
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define VIEWER_QUIT BUTTON_POWER
+#define VIEWER_PAGE_UP BUTTON_UP
+#define VIEWER_PAGE_DOWN BUTTON_DOWN
+#define VIEWER_SCREEN_LEFT BUTTON_LEFT
+#define VIEWER_SCREEN_RIGHT BUTTON_RIGHT
+#define VIEWER_MODE_WRAP (BUTTON_PLAY | BUTTON_REL)
+#define VIEWER_MODE_LINE (BUTTON_PLAY | BUTTON_REPEAT)
+#define VIEWER_MODE_WIDTH BUTTON_MENU
+
#endif
enum {