FS#8708: D2/m:robe500 touchscreen keymaps by Andreas Mueller.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17261 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index ad45d65..e2f7606 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -146,15 +146,27 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
-#define BATTERY_ON  BUTTON_MENU
 #define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT  "MENU - start"
 #define BATTERY_OFF_TXT "POWER  - quit"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BATTERY_ON
+#define BATTERY_ON       BUTTON_CENTER
+#endif
+#ifndef BATTERY_OFF
+#define BATTERY_OFF      BUTTON_TOPLEFT
+#endif
+#ifndef BATTERY_ON_TXT
+#define BATTERY_ON_TXT  "CENTRE - start"
+#endif
+#ifndef BATTERY_OFF_TXT
+#define BATTERY_OFF_TXT "TOPLEFT  - quit"
+#endif
+#endif
 
 /****************************** Plugin Entry Point ****************************/
 static struct plugin_api* rb;
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index c9814ab..c3d4926 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -251,24 +251,48 @@
 #define BJACK_LEFT       BUTTON_RC_REW
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define BJACK_START      BUTTON_SELECT
 #define BJACK_QUIT       BUTTON_POWER
-#define BJACK_MAX        BUTTON_PLUS
-#define BJACK_MIN        BUTTON_MINUS
-#define BJACK_HIT        BUTTON_SELECT
-#define BJACK_STAY       BUTTON_MENU
-#define BJACK_DOUBLEDOWN (BUTTON_DOWN|BUTTON_MENU)
-#define BJACK_SCORES     (BUTTON_SELECT|BUTTON_MENU)
-#define BJACK_RESUME     (BUTTON_SELECT|BUTTON_PLUS)
-#define BJACK_UP         BUTTON_UP
-#define BJACK_DOWN       BUTTON_DOWN
-#define BJACK_RIGHT      BUTTON_RIGHT
-#define BJACK_LEFT       BUTTON_LEFT
+#define BJACK_DOUBLEDOWN BUTTON_MINUS
+#define BJACK_SCORES     BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BJACK_START
+#define BJACK_START      BUTTON_CENTER
+#endif
+#ifndef BJACK_HIT
+#define BJACK_HIT        BUTTON_CENTER
+#endif
+#ifndef BJACK_MAX
+#define BJACK_MAX        BUTTON_TOPRIGHT
+#endif
+#ifndef BJACK_MIN
+#define BJACK_MIN        BUTTON_TOPLEFT
+#endif
+#ifndef BJACK_RESUME
+#define BJACK_RESUME     BUTTON_BOTTOMRIGHT
+#endif
+#ifndef BJACK_STAY
+#define BJACK_STAY       BUTTON_BOTTOMLEFT
+#endif
+#ifndef BJACK_UP
+#define BJACK_UP         BUTTON_TOPMIDDLE
+#endif
+#ifndef BJACK_DOWN
+#define BJACK_DOWN       BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef BJACK_RIGHT
+#define BJACK_RIGHT      BUTTON_MIDRIGHT
+#endif
+#ifndef BJACK_LEFT
+#define BJACK_LEFT       BUTTON_MIDLEFT
+#endif
+
+#endif
+
 #ifdef HAVE_LCD_COLOR
 #define BG_COLOR LCD_RGBPACK(0,157,0)
 #define FG_COLOR LCD_WHITE
@@ -1194,6 +1218,18 @@
             rb->lcd_puts(0, 8, "MENU to view scores");
             rb->snprintf(str, 21, "High Score: $%d", bj->highscores[0]);
             rb->lcd_puts(0, 10, str);
+#elif CONFIG_KEYPAD == COWOND2_PAD
+            rb->lcd_puts(0, 6, "POWER           to exit");
+            rb->lcd_puts(0, 7, "MINUS           to double down");
+            rb->lcd_puts(0, 8, "MENU            to view scores");
+            rb->snprintf(str, 21, "High Score:     $%d", bj->highscores[0]);
+            rb->lcd_puts(0, 10, str);
+#endif
+
+#ifdef HAVE_TOUCHPAD
+            rb->lcd_puts(0, 2, "LCD CENTRE      to start & to hit");
+            rb->lcd_puts(0, 3, "LCD BOTTOMLEFT  to stay");
+            rb->lcd_puts(0, 4, "LCD BOTTOMRIGHT to save/resume");
 #endif
         } else {
             rb->snprintf(str, 12, "%s", "High Scores");
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 2400325..c8a40de 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -139,10 +139,6 @@
 #define BOUNCE_MODE BUTTON_RC_MODE
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
-#define BOUNCE_LEFT BUTTON_LEFT
-#define BOUNCE_RIGHT BUTTON_RIGHT
-#define BOUNCE_UP   BUTTON_UP
-#define BOUNCE_DOWN BUTTON_DOWN
 #define BOUNCE_QUIT BUTTON_POWER
 #define BOUNCE_MODE BUTTON_MENU
 
@@ -150,6 +146,27 @@
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BOUNCE_LEFT
+#define BOUNCE_LEFT BUTTON_MIDLEFT
+#endif
+#ifndef BOUNCE_RIGHT
+#define BOUNCE_RIGHT BUTTON_MIDRIGHT
+#endif
+#ifndef BOUNCE_UP
+#define BOUNCE_UP   BUTTON_TOPMIDDLE
+#endif
+#ifndef BOUNCE_DOWN
+#define BOUNCE_DOWN BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef BOUNCE_QUIT
+#define BOUNCE_QUIT BUTTON_TOPLEFT
+#endif
+#ifndef BOUNCE_MODE
+#define BOUNCE_MODE BUTTON_CENTER
+#endif
+#endif
+
 static struct plugin_api* rb;
 
 #define LETTER_WIDTH  11
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index bae8ded..f0059ba 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -165,18 +165,30 @@
 #define RC_QUIT BUTTON_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_LEFT
-#define RIGHT BUTTON_RIGHT
-#define SELECT BUTTON_SELECT
-#define UP BUTTON_UP
-#define DOWN BUTTON_DOWN
+#define QUIT    BUTTON_POWER
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef LEFT
+#define LEFT    BUTTON_MIDLEFT
+#endif
+#ifndef RIGHT
+#define RIGHT   BUTTON_MIDRIGHT
+#endif
+#ifndef SELECT
+#define SELECT  BUTTON_CENTER
+#endif
+#ifndef UP
+#define UP      BUTTON_TOPMIDDLE
+#endif
+#ifndef DOWN
+#define DOWN    BUTTON_BOTTOMMIDDLE
+#endif
+#endif
+
 #ifndef SCROLL_FWD /* targets without scroll wheel*/
 #define SCROLL_FWD(x) (0)
 #define SCROLL_BACK(x) (0)
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index 979705f..38a97f0 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -251,20 +251,37 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 
-#define CALCULATOR_LEFT BUTTON_LEFT
-#define CALCULATOR_RIGHT BUTTON_RIGHT
-#define CALCULATOR_UP   BUTTON_UP
-#define CALCULATOR_DOWN BUTTON_DOWN
-#define CALCULATOR_QUIT BUTTON_POWER
-#define CALCULATOR_INPUT_CALC_PRE BUTTON_MINUS
-#define CALCULATOR_INPUT BUTTON_PLUS
-#define CALCULATOR_CALC BUTTON_SELECT
-#define CALCULATOR_CLEAR BUTTON_MENU
+#define CALCULATOR_QUIT           BUTTON_POWER
+#define CALCULATOR_CLEAR          BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef CALCULATOR_LEFT
+#define CALCULATOR_LEFT           BUTTON_MIDLEFT
+#endif
+#ifndef CALCULATOR_RIGHT
+#define CALCULATOR_RIGHT          BUTTON_MIDRIGHT
+#endif
+#ifndef CALCULATOR_UP
+#define CALCULATOR_UP             BUTTON_TOPMIDDLE
+#endif
+#ifndef CALCULATOR_DOWN
+#define CALCULATOR_DOWN           BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef CALCULATOR_CALC
+#define CALCULATOR_CALC           BUTTON_BOTTOMRIGHT
+#endif
+#ifndef CALCULATOR_INPUT
+#define CALCULATOR_INPUT          BUTTON_CENTER
+#endif
+#ifndef CALCULATOR_CLEAR
+#define CALCULATOR_CLEAR          BUTTON_TOPRIGHT
+#endif
+#endif
+
 static struct plugin_api* rb;
 
 enum {
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h
index a6b647b..7a7baf6 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -248,25 +248,57 @@
 #define CB_RC_QUIT BUTTON_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define CB_SELECT  BUTTON_SELECT
-#define CB_UP      BUTTON_UP
-#define CB_DOWN    BUTTON_DOWN
-#define CB_LEFT    BUTTON_LEFT
-#define CB_RIGHT   BUTTON_RIGHT
-#define CB_PLAY    BUTTON_MENU
 #define CB_LEVEL   BUTTON_PLUS
-#define CB_RESTART (BUTTON_SELECT | BUTTON_MENU)
-#define CB_MENU    BUTTON_POWER
+#define CB_RESTART BUTTON_MINUS
+#define CB_MENU    (BUTTON_MENU|BUTTON_REL)
 
-#define CB_SCROLL_UP     (BUTTON_UP|BUTTON_MENU)
-#define CB_SCROLL_DOWN   (BUTTON_DOWN|BUTTON_MENU)
-#define CB_SCROLL_LEFT   (BUTTON_LEFT|BUTTON_MENU)
-#define CB_SCROLL_RIGHT  (BUTTON_RIGHT|BUTTON_MENU)
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef CB_LEVEL
+#define CB_LEVEL          BUTTON_TOPLEFT
+#endif
+#ifndef CB_RESTART
+#define CB_RESTART        BUTTON_TOPRIGHT
+#endif
+#ifndef CB_MENU
+#define CB_MENU           (BUTTON_BOTTOMLEFT|BUTTON_REL)
+#endif
+#ifndef CB_PLAY
+#define CB_PLAY          (BUTTON_CENTER|BUTTON_REPEAT)
+#endif
+#ifndef CB_SELECT
+#define CB_SELECT         BUTTON_CENTER
+#endif
+#ifndef CB_UP
+#define CB_UP             BUTTON_TOPMIDDLE
+#endif
+#ifndef CB_DOWN
+#define CB_DOWN           BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef CB_LEFT
+#define CB_LEFT           BUTTON_MIDLEFT
+#endif
+#ifndef CB_RIGHT
+#define CB_RIGHT          BUTTON_MIDRIGHT
+#endif
+#ifndef CB_SCROLL_UP
+#define CB_SCROLL_UP     (BUTTON_TOPMIDDLE|BUTTON_REPEAT)
+#endif
+#ifndef CB_SCROLL_DOWN
+#define CB_SCROLL_DOWN   (BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT)
+#endif
+#ifndef CB_SCROLL_LEFT
+#define CB_SCROLL_LEFT   (BUTTON_MIDLEFT|BUTTON_REPEAT)
+#endif
+#ifndef CB_SCROLL_RIGHT
+#define CB_SCROLL_RIGHT  (BUTTON_MIDRIGHT|BUTTON_REPEAT)
+#endif
+#endif
+
 /* structure to represent the plies */
 struct pgn_ply_node {
     unsigned short player;
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 34eeb6b..d3e39e0 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -181,19 +181,37 @@
 #define CHC_SETTINGS_CANCEL BUTTON_RC_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define CHC_QUIT BUTTON_POWER
-#define CHC_STARTSTOP BUTTON_SELECT
-#define CHC_RESET (BUTTON_SELECT|BUTTON_MENU)
-#define CHC_MENU BUTTON_MENU
-#define CHC_SETTINGS_INC BUTTON_UP
-#define CHC_SETTINGS_DEC BUTTON_DOWN
-#define CHC_SETTINGS_OK BUTTON_SELECT
+#define CHC_QUIT            BUTTON_POWER
+#define CHC_RESET          (BUTTON_CENTER|BUTTON_MENU)
+#define CHC_MENU            BUTTON_MENU
+#define CHC_SETTINGS_INC    BUTTON_PLUS
+#define CHC_SETTINGS_DEC    BUTTON_MINUS
 #define CHC_SETTINGS_CANCEL BUTTON_POWER
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef CHC_SETTINGS_OK
+#define CHC_SETTINGS_OK  BUTTON_CENTER
+#endif
+#ifndef CHC_STARTSTOP
+#define CHC_STARTSTOP    BUTTON_CENTER
+#endif
+#ifndef CHC_SETTINGS_INC
+#define CHC_SETTINGS_INC BUTTON_TOPMIDDLE
+#endif
+#ifndef CHC_SETTINGS_DEC
+#define CHC_SETTINGS_DEC BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef CHC_RESET
+#define CHC_RESET        BUTTON_TOPLEFT
+#endif
+#ifndef CHC_MENU
+#define CHC_MENU         BUTTON_TOPRIGHT
+#endif
+#endif
 
 
 /* leave first line blank on bitmap display, for pause icon */
@@ -650,3 +668,4 @@
     }
 }
 
+
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 0f7e24b..e00e421 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1079,16 +1079,41 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define CHIP8_OFF  BUTTON_POWER
-#define CHIP8_KEY2 BUTTON_DOWN
-#define CHIP8_KEY4 BUTTON_LEFT
-#define CHIP8_KEY5 BUTTON_SELECT
-#define CHIP8_KEY6 BUTTON_RIGHT
-#define CHIP8_KEY8 BUTTON_UP
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef CHIP8_OFF
+#define CHIP8_OFF  BUTTON_TOPLEFT
+#endif
+#ifndef CHIP8_KEY1
+#define CHIP8_KEY1 BUTTON_TOPRIGHT
+#endif
+#ifndef CHIP8_KEY2
+#define CHIP8_KEY2 BUTTON_TOPMIDDLE
+#endif
+#ifndef CHIP8_KEY3
+#define CHIP8_KEY3 BUTTON_BOTTOMLEFT
+#endif
+#ifndef CHIP8_KEY4
+#define CHIP8_KEY4 BUTTON_MIDLEFT
+#endif
+#ifndef CHIP8_KEY5
+#define CHIP8_KEY5 BUTTON_CENTER
+#endif
+#ifndef CHIP8_KEY6
+#define CHIP8_KEY6 BUTTON_MIDRIGHT
+#endif
+#ifndef CHIP8_KEY7
+#define CHIP8_KEY7 BUTTON_BOTTOMRIGHT
+#endif
+#ifndef CHIP8_KEY8
+#define CHIP8_KEY8 BUTTON_BOTTOMMIDDLE
+#endif
+#endif
+
 static byte chip8_virtual_keys[16];
 static byte chip8_keymap[16];
 
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c
index 71f62f4..2ab7c09 100644
--- a/apps/plugins/chopper.c
+++ b/apps/plugins/chopper.c
@@ -105,14 +105,26 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define QUIT BUTTON_POWER
-#define ACTION BUTTON_UP
-#define ACTION2 BUTTON_MENU
-#define ACTIONTEXT "UP"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef QUIT
+#define QUIT        BUTTON_TOPLEFT
+#endif
+#ifndef ACTION
+#define ACTION      BUTTON_BOTTOMLEFT
+#endif
+#ifndef ACTION2
+#define ACTION2     BUTTON_BOTTOMRIGHT
+#endif
+#ifndef ACTIONTEXT
+#define ACTIONTEXT "BOTTOMRIGHT"
+#endif
+#endif
+
 static struct plugin_api* rb;
 
 #define NUMBER_OF_BLOCKS 8
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 7dca203..aed2732 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -243,21 +243,47 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define CUBE_QUIT          BUTTON_POWER
-#define CUBE_X_INC         BUTTON_RIGHT
-#define CUBE_X_DEC         BUTTON_LEFT
-#define CUBE_Y_INC         BUTTON_UP
-#define CUBE_Y_DEC         BUTTON_DOWN
-#define CUBE_Z_INC         BUTTON_PLUS
-#define CUBE_Z_DEC         BUTTON_MINUS
-#define CUBE_MODE          BUTTON_MENU
-#define CUBE_PAUSE_PRE     BUTTON_SELECT
-#define CUBE_PAUSE         (BUTTON_MINUS | BUTTON_REL)
-#define CUBE_HIGHSPEED     (BUTTON_PLUS | BUTTON_REL)
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+// not enough touchfields, so CUBE_QUIT have to be 
+// mapped to a real button
+//ifndef CUBE_QUIT
+//#define CUBE_QUIT          BUTTON_TOPLEFT
+//#endif
+#ifndef CUBE_X_INC
+#define CUBE_X_INC         BUTTON_MIDRIGHT
+#endif
+#ifndef CUBE_X_DEC
+#define CUBE_X_DEC         BUTTON_MIDLEFT
+#endif
+#ifndef CUBE_Y_INC
+#define CUBE_Y_INC         BUTTON_TOPMIDDLE
+#endif
+#ifndef CUBE_Y_DEC
+#define CUBE_Y_DEC         BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef CUBE_Z_INC
+#define CUBE_Z_INC         BUTTON_BOTTOMRIGHT
+#endif
+#ifndef CUBE_Z_DEC
+#define CUBE_Z_DEC         BUTTON_BOTTOMLEFT
+#endif
+#ifndef CUBE_MODE
+#define CUBE_MODE          BUTTON_TOPRIGHT
+#endif
+#ifndef CUBE_PAUSE
+#define CUBE_PAUSE        (BUTTON_CENTER | BUTTON_REL)
+#endif
+#ifndef CUBE_HIGHSPEED
+#define CUBE_HIGHSPEED     BUTTON_TOPLEFT
+#endif
+#endif
+
+
 #ifdef HAVE_LCD_BITMAP
 
 #define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16)
@@ -854,3 +880,4 @@
     return PLUGIN_OK;
 }
 
+
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 3e78127..117c2b9 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -247,14 +247,6 @@
 #define DOOMBUTTON_WEAPON     BUTTON_RC_MENU
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define DOOMBUTTON_ESC        BUTTON_POWER
-#define DOOMBUTTON_UP         BUTTON_UP
-#define DOOMBUTTON_DOWN       BUTTON_DOWN
-#define DOOMBUTTON_LEFT       BUTTON_LEFT
-#define DOOMBUTTON_RIGHT      BUTTON_RIGHT
-#define DOOMBUTTON_OPEN       BUTTON_PLUS
-#define DOOMBUTTON_SHOOT      BUTTON_SELECT
-#define DOOMBUTTON_ENTER      BUTTON_MENU
-#define DOOMBUTTON_WEAPON     BUTTON_MINUS
 #elif CONFIG_KEYPAD == MROBE100_PAD
 #define DOOMBUTTON_UP      BUTTON_UP
 #define DOOMBUTTON_DOWN    BUTTON_DOWN
@@ -269,6 +261,36 @@
 #error Keymap not defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef DOOMBUTTON_UP
+#define DOOMBUTTON_UP      BUTTON_TOPMIDDLE
+#endif
+#ifndef DOOMBUTTON_DOWN
+#define DOOMBUTTON_DOWN    BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef DOOMBUTTON_LEFT
+#define DOOMBUTTON_LEFT    BUTTON_MIDLEFT
+#endif
+#ifndef DOOMBUTTON_RIGHT
+#define DOOMBUTTON_RIGHT   BUTTON_MIDRIGHT
+#endif
+#ifndef DOOMBUTTON_SHOOT
+#define DOOMBUTTON_SHOOT   BUTTON_CENTER
+#endif
+#ifndef DOOMBUTTON_OPEN
+#define DOOMBUTTON_OPEN    BUTTON_TOPRIGHT
+#endif
+#ifndef DOOMBUTTON_ESC
+#define DOOMBUTTON_ESC     BUTTON_TOPLEFT
+#endif
+#ifndef DOOMBUTTON_ENTER
+#define DOOMBUTTON_ENTER   BUTTON_BOTTOMLEFT
+#endif
+#ifndef DOOMBUTTON_WEAPON
+#define DOOMBUTTON_WEAPON  BUTTON_BOTTOMRIGHT
+#endif
+#endif
+
 #ifdef DOOMBUTTON_SCROLLWHEEL
 /* Scrollwheel events are posted directly and not polled by the button
    driver - synthesize polling */
diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c
index 3af9bdf..361930f 100644
--- a/apps/plugins/fireworks.c
+++ b/apps/plugins/fireworks.c
@@ -70,12 +70,20 @@
 #define BTN_MENU BUTTON_RC_REC
 #define BTN_FIRE BUTTON_RC_PLAY
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
-#define BTN_MENU BUTTON_MENU
-#define BTN_FIRE BUTTON_SELECT
+#define BTN_MENU (BUTTON_MENU|BUTTON_REL)
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BTN_MENU
+#define BTN_MENU (BUTTON_TOPLEFT|BUTTON_REL)
+#endif
+#ifndef BTN_FIRE
+#define BTN_FIRE BUTTON_CENTER
+#endif
+#endif
+
 /* The lowdown on source terminology:
  * a ROCKET is launched from the LCD bottom.
  * FIREWORKs are ejected from the rocket when it explodes. */
diff --git a/apps/plugins/flashlight.c b/apps/plugins/flashlight.c
index c3c061b..e502d0e 100644
--- a/apps/plugins/flashlight.c
+++ b/apps/plugins/flashlight.c
@@ -70,14 +70,27 @@
 #   define FLASHLIGHT_RIGHT      BUTTON_RIGHT
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#   define FLASHLIGHT_LEFT       BUTTON_LEFT
-#   define FLASHLIGHT_RIGHT      BUTTON_RIGHT
 
 #else
 #   error Missing key definitions for this keypad
 #endif
 #endif
 
+#ifdef HAVE_TOUCHPAD
+# ifndef FLASHLIGHT_LEFT
+#   define FLASHLIGHT_LEFT       BUTTON_MIDLEFT
+# endif
+# ifndef FLASHLIGHT_RIGHT
+#   define FLASHLIGHT_RIGHT      BUTTON_MIDRIGHT
+# endif
+# ifndef FLASHLIGHT_NEXT
+#   define FLASHLIGHT_NEXT       BUTTON_TOPMIDDLE
+# endif
+# ifndef FLASHLIGHT_PREV
+#   define FLASHLIGHT_PREV       BUTTON_BOTTOMMIDDLE
+# endif
+#endif
+
 static struct plugin_api* rb; /* global api struct pointer */
 
 #ifdef HAVE_LCD_COLOR
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 5894826..874ddf4 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -208,21 +208,42 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
-#define FLIPIT_LEFT         BUTTON_LEFT
-#define FLIPIT_RIGHT        BUTTON_RIGHT
-#define FLIPIT_UP           BUTTON_UP
-#define FLIPIT_DOWN         BUTTON_DOWN
 #define FLIPIT_QUIT         BUTTON_POWER
-#define FLIPIT_SHUFFLE      (BUTTON_LEFT|BUTTON_MENU)
-#define FLIPIT_SOLVE        (BUTTON_RIGHT|BUTTON_MENU)
-#define FLIPIT_STEP_BY_STEP BUTTON_MINUS
-#define FLIPIT_TOGGLE_PRE   BUTTON_PLUS
-#define FLIPIT_TOGGLE       BUTTON_SELECT
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef FLIPIT_LEFT
+#define FLIPIT_LEFT         BUTTON_MIDLEFT
+#endif
+#ifndef FLIPIT_RIGHT
+#define FLIPIT_RIGHT        BUTTON_MIDRIGHT
+#endif
+#ifndef FLIPIT_UP
+#define FLIPIT_UP           BUTTON_TOPMIDDLE
+#endif
+#ifndef FLIPIT_DOWN
+#define FLIPIT_DOWN         BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef FLIPIT_QUIT
+#define FLIPIT_QUIT         BUTTON_TOPLEFT
+#endif
+#ifndef FLIPIT_SHUFFLE
+#define FLIPIT_SHUFFLE      BUTTON_TOPRIGHT
+#endif
+#ifndef FLIPIT_SOLVE
+#define FLIPIT_SOLVE        BUTTON_BOTTOMLEFT
+#endif
+#ifndef FLIPIT_STEP_BY_STEP
+#define FLIPIT_STEP_BY_STEP BUTTON_BOTTOMRIGHT
+#endif
+#ifndef FLIPIT_TOGGLE
+#define FLIPIT_TOGGLE       BUTTON_CENTER
+#endif
+#endif
+
 static struct plugin_api* rb;
 static int spots[20];
 static int toggle[20];
@@ -651,6 +672,15 @@
     rb->lcd_putsxy(2, 38, "[MENU..] solution");
     rb->lcd_putsxy(2, 48, "[MENU] step by step");
 #endif
+
+#ifdef HAVE_TOUCHPAD
+    rb->lcd_putsxy(2, 8, "[BOTTOMLEFT]  to stop");
+    rb->lcd_putsxy(2, 18, "[CENTRE]      toggle");
+    rb->lcd_putsxy(2, 28, "[TOPRIGHT]    shuffle");
+    rb->lcd_putsxy(2, 38, "[BOTTOMLEFT]  solution");
+    rb->lcd_putsxy(2, 48, "[BOTTOMRIGHT] step by step");
+#endif
+
     rb->lcd_update();
 #else /* HAVE_LCD_CHARCELLS */
     if (!init_gfx())
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index d7439ee..946e36d 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -117,14 +117,25 @@
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
 #define QUIT BUTTON_POWER
-#define LEFT BUTTON_MINUS
-#define RIGHT BUTTON_PLUS
-#define FIRE BUTTON_MENU
 
 #else
     #error INVADROX: Unsupported keypad
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef QUIT
+#define QUIT     BUTTON_TOPLEFT
+#endif
+#ifndef LEFT
+#define LEFT     BUTTON_MIDLEFT
+#endif
+#ifndef RIGHT
+#define RIGHT    BUTTON_MIDRIGHT
+#endif
+#ifndef FIRE
+#define FIRE     BUTTON_CENTER
+#endif
+#endif
 
 #ifndef UNUSED
 #define UNUSED __attribute__ ((unused))
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index f93ea62..ddd659d 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -149,17 +149,33 @@
 #define JEWELS_RC_CANCEL BUTTON_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define JEWELS_UP     BUTTON_UP
-#define JEWELS_DOWN   BUTTON_DOWN
-#define JEWELS_LEFT   BUTTON_LEFT
-#define JEWELS_RIGHT  BUTTON_RIGHT
-#define JEWELS_SELECT BUTTON_SELECT
 #define JEWELS_CANCEL BUTTON_POWER
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef JEWELS_UP
+#define JEWELS_UP     BUTTON_TOPMIDDLE
+#endif
+#ifndef JEWELS_DOWN
+#define JEWELS_DOWN   BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef JEWELS_LEFT
+#define JEWELS_LEFT   BUTTON_MIDLEFT
+#endif
+#ifndef JEWELS_RIGHT
+#define JEWELS_RIGHT  BUTTON_MIDRIGHT
+#endif
+#ifndef JEWELS_SELECT
+#define JEWELS_SELECT BUTTON_CENTER
+#endif
+#ifndef JEWELS_CANCEL
+#define JEWELS_CANCEL BUTTON_TOPLEFT
+#endif
+#endif
+
 /* use 30x30 tiles (iPod Video, Gigabeat) */
 #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) || \
       ((LCD_HEIGHT == 320) && (LCD_WIDTH == 240))
@@ -1574,14 +1590,6 @@
                 rb->lcd_puts(0, 11, "Long PLAY for menu");
                 rb->lcd_puts(0, 12, "REC to cancel");
 #elif CONFIG_KEYPAD == COWOND2_PAD
-                rb->lcd_puts(0, 2, "Swap pairs of jewels to");
-                rb->lcd_puts(0, 3, "form connected segments");
-                rb->lcd_puts(0, 4, "of three or more of the");
-                rb->lcd_puts(0, 5, "same type.");
-                rb->lcd_puts(0, 7, "Controls:");
-                rb->lcd_puts(0, 8, "Directions to move");
-                rb->lcd_puts(0, 9, "SELECT to select");
-                rb->lcd_puts(0, 10, "Long SELECT to show menu");
                 rb->lcd_puts(0, 11, "POWER to cancel");
 #elif CONFIG_KEYPAD == GIGABEAT_S_PAD
                 rb->lcd_puts(0, 2, "Swap pairs of jewels to");
@@ -1596,6 +1604,17 @@
 #else
     #warning: missing help text.
 #endif
+
+#ifdef HAVE_TOUCHPAD
+                rb->lcd_puts(0, 2, "Swap pairs of jewels to");
+                rb->lcd_puts(0, 3, "form connected segments");
+                rb->lcd_puts(0, 4, "of three or more of the");
+                rb->lcd_puts(0, 5, "same type.");
+                rb->lcd_puts(0, 7, "Controls:");
+                rb->lcd_puts(0, 8, "Directions to move");
+                rb->lcd_puts(0, 9, "CENTER to select");
+                rb->lcd_puts(0, 10, "Long CENTER to show menu");
+#endif
                 rb->lcd_update();
                 while(true) {
                     button = rb->button_get(true);
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 596d4d7..cac8038 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -211,20 +211,41 @@
 #define JPEG_PREVIOUS    BUTTON_RC_MENU
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define JPEG_ZOOM_IN    BUTTON_PLUS
-#define JPEG_ZOOM_OUT   BUTTON_MINUS
-#define JPEG_UP         BUTTON_UP
-#define JPEG_DOWN       BUTTON_DOWN
-#define JPEG_LEFT       BUTTON_LEFT
-#define JPEG_RIGHT      BUTTON_RIGHT
-#define JPEG_MENU       BUTTON_MENU
-#define JPEG_NEXT       (BUTTON_SELECT|BUTTON_PLUS)
-#define JPEG_PREVIOUS   (BUTTON_SELECT|BUTTON_MINUS)
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef JPEG_UP
+#define JPEG_UP         BUTTON_TOPMIDDLE
+#endif
+#ifndef JPEG_DOWN
+#define JPEG_DOWN       BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef JPEG_LEFT
+#define JPEG_LEFT       BUTTON_MIDLEFT
+#endif
+#ifndef JPEG_RIGHT
+#define JPEG_RIGHT      BUTTON_MIDRIGHT
+#endif
+#ifndef JPEG_ZOOM_IN
+#define JPEG_ZOOM_IN    BUTTON_TOPRIGHT
+#endif
+#ifndef JPEG_ZOOM_OUT
+#define JPEG_ZOOM_OUT   BUTTON_TOPLEFT
+#endif
+#ifndef JPEG_MENU
+#define JPEG_MENU       (BUTTON_CENTER|BUTTON_REL)
+#endif
+#ifndef JPEG_NEXT
+#define JPEG_NEXT       BUTTON_BOTTOMRIGHT
+#endif
+#ifndef JPEG_PREVIOUS
+#define JPEG_PREVIOUS   BUTTON_BOTTOMLEFT
+#endif
+#endif
+
 /* different graphics libraries */
 #if LCD_DEPTH < 8
 #define USEGSLIB
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 7a1a746..f08ca3a 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -138,10 +138,6 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define LP_QUIT BUTTON_POWER
-#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
@@ -162,6 +158,23 @@
 #endif
 #endif /* CONFIG_REMOTE_KEYPAD */
 
+#ifdef HAVE_TOUCHPAD
+#ifndef LP_QUIT
+#define LP_QUIT  BUTTON_TOPLEFT
+#endif
+#ifndef LP_DEC_X
+#define LP_DEC_X BUTTON_MIDLEFT
+#endif
+#ifndef LP_INC_X
+#define LP_INC_X BUTTON_MIDRIGHT
+#endif
+#ifndef LP_DEC_Y
+#define LP_DEC_Y BUTTON_TOPMIDDLE
+#endif
+#ifndef LP_INC_Y
+#define LP_INC_Y BUTTON_BOTTOMMIDDLE
+#endif
+#endif
 
 enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
     int button;
@@ -289,3 +302,4 @@
     }
 }
 
+
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c
index 244d94b..1576b87 100644
--- a/apps/plugins/mandelbrot.c
+++ b/apps/plugins/mandelbrot.c
@@ -220,22 +220,47 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define MANDELBROT_QUIT          BUTTON_POWER
-#define MANDELBROT_UP            BUTTON_UP
-#define MANDELBROT_DOWN          BUTTON_DOWN
-#define MANDELBROT_LEFT          BUTTON_LEFT
-#define MANDELBROT_RIGHT         BUTTON_RIGHT
-#define MANDELBROT_ZOOM_IN_PRE   BUTTON_SELECT
-#define MANDELBROT_ZOOM_IN       (BUTTON_SELECT | BUTTON_PLUS)
-#define MANDELBROT_ZOOM_OUT_PRE  BUTTON_SELECT
-#define MANDELBROT_ZOOM_OUT      (BUTTON_SELECT | BUTTON_MINUS)
-#define MANDELBROT_MAXITER_INC   BUTTON_PLUS
-#define MANDELBROT_MAXITER_DEC   BUTTON_MINUS
-#define MANDELBROT_RESET         BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MANDELBROT_UP
+#define MANDELBROT_UP            BUTTON_TOPMIDDLE
+#endif
+#ifndef MANDELBROT_DOWN
+#define MANDELBROT_DOWN          BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MANDELBROT_LEFT
+#define MANDELBROT_LEFT          BUTTON_MIDLEFT
+#endif
+#ifndef MANDELBROT_RIGHT
+#define MANDELBROT_RIGHT         BUTTON_MIDRIGHT
+#endif
+#ifndef MANDELBROT_ZOOM_IN_PRE
+#define MANDELBROT_ZOOM_IN_PRE   BUTTON_TOPRIGHT
+#endif
+#ifndef MANDELBROT_ZOOM_IN
+#define MANDELBROT_ZOOM_IN      (BUTTON_TOPRIGHT | BUTTON_REL)
+#endif
+#ifndef MANDELBROT_ZOOM_OUT_PRE
+#define MANDELBROT_ZOOM_OUT_PRE  BUTTON_TOPLEFT
+#endif
+#ifndef MANDELBROT_ZOOM_OUT
+#define MANDELBROT_ZOOM_OUT     (BUTTON_TOPLEFT | BUTTON_REL)
+#endif
+#ifndef MANDELBROT_MAXITER_INC
+#define MANDELBROT_MAXITER_INC   BUTTON_BOTTOMRIGHT
+#endif
+#ifndef MANDELBROT_MAXITER_DEC
+#define MANDELBROT_MAXITER_DEC   BUTTON_BOTTOMLEFT
+#endif
+#ifndef MANDELBROT_RESET
+#define MANDELBROT_RESET         BUTTON_CENTER
+#endif
+#endif
+
 #if LCD_DEPTH < 8
 #define USEGSLIB
 #define MYLCD(fn) grey_ub_ ## fn
diff --git a/apps/plugins/matrix.c b/apps/plugins/matrix.c
index c445867..0086007 100644
--- a/apps/plugins/matrix.c
+++ b/apps/plugins/matrix.c
@@ -97,13 +97,25 @@
 #define MATRIX_PAUSE BUTTON_RC_PLAY
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define MATRIX_EXIT BUTTON_POWER
-#define MATRIX_SLEEP_MORE BUTTON_PLUS
-#define MATRIX_SLEEP_LESS BUTTON_MINUS
-#define MATRIX_PAUSE BUTTON_MENU
 #else
 #error Unsupported keypad
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MATRIX_EXIT
+#define MATRIX_EXIT       BUTTON_TOPLEFT
+#endif
+#ifndef MATRIX_SLEEP_MORE
+#define MATRIX_SLEEP_MORE BUTTON_MIDRIGHT
+#endif
+#ifndef MATRIX_SLEEP_LESS
+#define MATRIX_SLEEP_LESS BUTTON_MIDLEFT
+#endif
+#ifndef MATRIX_PAUSE
+#define MATRIX_PAUSE      BUTTON_CENTER
+#endif
+#endif
+
 #define SLEEP HZ/50
 
 /* Codec api pointer */
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c
index 84bfe30..f99fafc 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -137,17 +137,33 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define BTN_QUIT         BUTTON_POWER
-#define BTN_RIGHT        BUTTON_RIGHT
-#define BTN_LEFT         BUTTON_LEFT
-#define BTN_UP           BUTTON_UP
-#define BTN_DOWN         BUTTON_DOWN
-#define BTN_PLAY         BUTTON_SELECT
 
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BTN_QUIT
+#define BTN_QUIT         BUTTON_TOPLEFT
+#endif
+#ifndef BTN_RIGHT
+#define BTN_RIGHT        BUTTON_MIDRIGHT
+#endif
+#ifndef BTN_LEFT
+#define BTN_LEFT         BUTTON_MIDLEFT
+#endif
+#ifndef BTN_UP
+#define BTN_UP           BUTTON_TOPMIDDLE
+#endif
+#ifndef BTN_DOWN
+#define BTN_DOWN         BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef BTN_PLAY
+#define BTN_PLAY         BUTTON_CENTER
+#endif
+#endif
+
 #undef SYNC
 
 #ifdef SIMULATOR
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 5066844..e4b8c93 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -184,19 +184,39 @@
 #   define MINESWP_INFO     BUTTON_RC_MENU
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
-#   define MINESWP_LEFT     BUTTON_LEFT
-#   define MINESWP_RIGHT    BUTTON_RIGHT
-#   define MINESWP_UP       BUTTON_UP
-#   define MINESWP_DOWN     BUTTON_DOWN
 #   define MINESWP_QUIT     BUTTON_POWER
-#   define MINESWP_TOGGLE   BUTTON_SELECT
-#   define MINESWP_DISCOVER BUTTON_MENU
-#   define MINESWP_INFO     (BUTTON_MENU | BUTTON_SELECT)
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MINESWP_QUIT
+#   define MINESWP_QUIT     BUTTON_TOPLEFT
+#endif
+#ifndef MINESWP_LEFT
+#   define MINESWP_LEFT     BUTTON_MIDLEFT
+#endif
+#ifndef MINESWP_RIGHT
+#   define MINESWP_RIGHT    BUTTON_MIDRIGHT
+#endif
+#ifndef MINESWP_UP
+#   define MINESWP_UP       BUTTON_TOPMIDDLE
+#endif
+#ifndef MINESWP_DOWN
+#   define MINESWP_DOWN     BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MINESWP_TOGGLE
+#   define MINESWP_TOGGLE   BUTTON_CENTER
+#endif
+#ifndef MINESWP_DISCOVER
+#   define MINESWP_DISCOVER BUTTON_BOTTOMLEFT
+#endif
+#ifndef MINESWP_INFO
+#   define MINESWP_INFO     BUTTON_BOTTOMRIGHT
+#endif
+#endif
+
 /* here is a global api struct pointer. while not strictly necessary,
  * it's nice not to have to pass the api pointer in all function calls
  * in the plugin
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 8163685..9545f89 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -124,13 +124,23 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define MOSAIQUE_QUIT BUTTON_POWER
-#define MOSAIQUE_SPEED BUTTON_RIGHT
-#define MOSAIQUE_RESTART BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MOSAIQUE_QUIT
+#define MOSAIQUE_QUIT    BUTTON_TOPLEFT
+#endif
+#ifndef MOSAIQUE_SPEED
+#define MOSAIQUE_SPEED   BUTTON_MIDRIGHT
+#endif
+#ifndef MOSAIQUE_RESTART
+#define MOSAIQUE_RESTART BUTTON_CENTER
+#endif
+#endif
+
 enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
 {
     int button;
@@ -231,3 +241,4 @@
     }
 }
 
+
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 2f7a990..a344bdc 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2333,14 +2333,26 @@
 #define MP3ENC_DONE BUTTON_RC_REC
 #define MP3ENC_SELECT BUTTON_RC_FF
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define MP3ENC_PREV BUTTON_UP
-#define MP3ENC_NEXT BUTTON_DOWN
 #define MP3ENC_DONE BUTTON_POWER
-#define MP3ENC_SELECT BUTTON_SELECT
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MP3ENC_PREV
+#define MP3ENC_PREV   BUTTON_MIDLEFT
+#endif
+#ifndef MP3ENC_NEXT
+#define MP3ENC_NEXT   BUTTON_MIDRIGHT
+#endif
+#ifndef MP3ENC_DONE
+#define MP3ENC_DONE   BUTTON_TOPLEFT
+#endif
+#ifndef MP3ENC_SELECT
+#define MP3ENC_SELECT BUTTON_CENTER
+#endif
+#endif
+
 enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
 {
     int   rat, srat, nrat; /* for rate selection */
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index b7b7def..4d9e562 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -111,19 +111,39 @@
 #define MPEG_START_TIME_EXIT        BUTTON_RC_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define MPEG_START_TIME_SELECT      BUTTON_SELECT
-#define MPEG_START_TIME_SCROLL_UP   BUTTON_PLUS
-#define MPEG_START_TIME_SCROLL_DOWN BUTTON_MINUS
-#define MPEG_START_TIME_LEFT        BUTTON_LEFT
-#define MPEG_START_TIME_RIGHT       BUTTON_RIGHT
-#define MPEG_START_TIME_UP          BUTTON_UP
-#define MPEG_START_TIME_DOWN        BUTTON_DOWN
 #define MPEG_START_TIME_EXIT        BUTTON_POWER
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MPEG_START_TIME_SELECT
+#define MPEG_START_TIME_SELECT      BUTTON_CENTER
+#endif
+#ifndef MPEG_START_TIME_SCROLL_UP
+#define MPEG_START_TIME_SCROLL_UP   BUTTON_TOPRIGHT
+#endif
+#ifndef MPEG_START_TIME_SCROLL_DOWN
+#define MPEG_START_TIME_SCROLL_DOWN BUTTON_TOPLEFT
+#endif
+#ifndef MPEG_START_TIME_LEFT
+#define MPEG_START_TIME_LEFT        BUTTON_MIDLEFT
+#endif
+#ifndef MPEG_START_TIME_RIGHT
+#define MPEG_START_TIME_RIGHT       BUTTON_MIDRIGHT
+#endif
+#ifndef MPEG_START_TIME_UP
+#define MPEG_START_TIME_UP          BUTTON_TOPMIDDLE
+#endif
+#ifndef MPEG_START_TIME_DOWN
+#define MPEG_START_TIME_DOWN        BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MPEG_START_TIME_EXIT
+#define MPEG_START_TIME_EXIT        BUTTON_TOPLEFT
+#endif
+#endif
+
 static struct configdata config[] =
 {
     {TYPE_INT, 0, 2, &settings.showfps, "Show FPS", NULL, NULL},
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 8a94790..e63246b 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -212,18 +212,39 @@
 #define MPEG_FF         BUTTON_RC_FF
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define MPEG_MENU       BUTTON_MENU
-#define MPEG_STOP       BUTTON_POWER
-#define MPEG_PAUSE      BUTTON_SELECT
+#define MPEG_MENU       (BUTTON_MENU|BUTTON_REL)
+//#define MPEG_STOP       BUTTON_POWER
 #define MPEG_VOLDOWN    BUTTON_MINUS
 #define MPEG_VOLUP      BUTTON_PLUS
-#define MPEG_RW         BUTTON_LEFT
-#define MPEG_FF         BUTTON_RIGHT
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef MPEG_MENU
+#define MPEG_MENU      (BUTTON_TOPRIGHT|BUTTON_REL)
+#endif
+#ifndef MPEG_STOP
+#define MPEG_STOP       BUTTON_TOPLEFT
+#endif
+#ifndef MPEG_PAUSE
+#define MPEG_PAUSE      BUTTON_CENTER
+#endif
+#ifndef MPEG_VOLDOWN
+#define MPEG_VOLDOWN    BUTTON_TOPMIDDLE
+#endif
+#ifndef MPEG_VOLUP
+#define MPEG_VOLUP      BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MPEG_RW
+#define MPEG_RW         BUTTON_MIDLEFT
+#endif
+#ifndef MPEG_FF
+#define MPEG_FF         BUTTON_MIDRIGHT
+#endif
+#endif
+
 struct plugin_api* rb;
 
 CACHE_FUNCTION_WRAPPERS(rb);
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index d576c81..eae1a7b 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -183,14 +183,6 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define OSCILLOSCOPE_QUIT         BUTTON_POWER
-#define OSCILLOSCOPE_DRAWMODE_PRE (BUTTON_LEFT | BUTTON_MENU)
-#define OSCILLOSCOPE_DRAWMODE     (BUTTON_RIGHT | BUTTON_MENU)
-#define OSCILLOSCOPE_ADVMODE      (BUTTON_SELECT|BUTTON_MENU)
-#define OSCILLOSCOPE_ORIENTATION_PRE (BUTTON_UP | BUTTON_MENU)
-#define OSCILLOSCOPE_ORIENTATION  (BUTTON_DOWN | BUTTON_MENU)
-#define OSCILLOSCOPE_PAUSE        BUTTON_SELECT
-#define OSCILLOSCOPE_SPEED_UP     BUTTON_UP
-#define OSCILLOSCOPE_SPEED_DOWN   BUTTON_DOWN
 #define OSCILLOSCOPE_VOL_UP       BUTTON_PLUS
 #define OSCILLOSCOPE_VOL_DOWN     BUTTON_MINUS
 
@@ -198,6 +190,36 @@
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef OSCILLOSCOPE_QUIT
+#define OSCILLOSCOPE_QUIT         BUTTON_TOPLEFT
+#endif
+#ifndef OSCILLOSCOPE_DRAWMODE
+#define OSCILLOSCOPE_DRAWMODE     BUTTON_TOPMIDDLE
+#endif
+#ifndef OSCILLOSCOPE_ADVMODE
+#define OSCILLOSCOPE_ADVMODE      BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef OSCILLOSCOPE_ORIENTATION
+#define OSCILLOSCOPE_ORIENTATION  BUTTON_BOTTOMLEFT
+#endif
+#ifndef OSCILLOSCOPE_PAUSE
+#define OSCILLOSCOPE_PAUSE        BUTTON_CENTER
+#endif
+#ifndef OSCILLOSCOPE_SPEED_UP
+#define OSCILLOSCOPE_SPEED_UP     BUTTON_MIDRIGHT
+#endif
+#ifndef OSCILLOSCOPE_SPEED_DOWN
+#define OSCILLOSCOPE_SPEED_DOWN   BUTTON_MIDLEFT
+#endif
+#ifndef OSCILLOSCOPE_VOL_UP
+#define OSCILLOSCOPE_VOL_UP       BUTTON_TOPRIGHT
+#endif
+#ifndef OSCILLOSCOPE_VOL_DOWN
+#define OSCILLOSCOPE_VOL_DOWN     BUTTON_BOTTOMRIGHT
+#endif
+#endif
+
 /* colours */
 #if LCD_DEPTH > 1
 #ifdef HAVE_LCD_COLOR
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index d316b70..8350e4e 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -132,15 +132,7 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
-#define PACMAN_UP       BUTTON_UP
-#define PACMAN_DOWN     BUTTON_DOWN
-#define PACMAN_LEFT     BUTTON_LEFT
-#define PACMAN_RIGHT    BUTTON_RIGHT
-#define PACMAN_1UP      BUTTON_MINUS
-#define PACMAN_2UP      BUTTON_PLUS
-#define PACMAN_COIN_PRE BUTTON_SELECT
-#define PACMAN_COIN     (BUTTON_MENU | BUTTON_SELECT)
-#define PACMAN_MENU     BUTTON_MENU
+#define PACMAN_MENU     (BUTTON_MENU|BUTTON_REL)
 
 #else
 
@@ -148,6 +140,33 @@
 
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef PACMAN_UP
+#define PACMAN_UP       BUTTON_TOPMIDDLE
+#endif
+#ifndef PACMAN_DOWN
+#define PACMAN_DOWN     BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef PACMAN_LEFT
+#define PACMAN_LEFT     BUTTON_MIDLEFT
+#endif
+#ifndef PACMAN_RIGHT
+#define PACMAN_RIGHT    BUTTON_MIDRIGHT
+#endif
+#ifndef PACMAN_1UP
+#define PACMAN_1UP      BUTTON_BOTTOMLEFT
+#endif
+#ifndef PACMAN_2UP
+#define PACMAN_2UP      BUTTON_BOTTOMRIGHT
+#endif
+#ifndef PACMAN_COIN
+#define PACMAN_COIN    BUTTON_CENTER
+#endif
+#ifndef PACMAN_MENU
+#define PACMAN_MENU    (BUTTON_TOPLEFT|BUTTON_REL)
+#endif
+#endif
+
 #if (LCD_HEIGHT >= 288)
 #define XOFS ((LCD_WIDTH-224)/2)
 #define YOFS ((LCD_HEIGHT-288)/2)
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index 45c830a..e41c724 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -273,25 +273,58 @@
 #define LVL_DOWN_TEXT "VOL-"
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define PEGBOX_SAVE     BUTTON_SELECT
 #define PEGBOX_QUIT     BUTTON_POWER
-#define PEGBOX_RESTART  BUTTON_MENU
-#define PEGBOX_LVL_UP   BUTTON_PLUS
-#define PEGBOX_LVL_DOWN BUTTON_MINUS
-#define PEGBOX_UP       BUTTON_UP
-#define PEGBOX_DOWN     BUTTON_DOWN
-#define PEGBOX_RIGHT    BUTTON_RIGHT
-#define PEGBOX_LEFT     BUTTON_LEFT
 
-#define SAVE_TEXT "SELECT"
 #define QUIT_TEXT "POWER"
-#define RESTART_TEXT "MENU"
-#define LVL_UP_TEXT "PLUS"
-#define LVL_DOWN_TEXT "MINUS"
 #else
 #error Unsupported keymap!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef PEGBOX_QUIT
+#define PEGBOX_QUIT     BUTTON_TOPLEFT
+#endif
+#ifndef PEGBOX_SAVE
+#define PEGBOX_SAVE     BUTTON_CENTER
+#endif
+#ifndef PEGBOX_RESTART
+#define PEGBOX_RESTART  BUTTON_TOPRIGHT
+#endif
+#ifndef PEGBOX_LVL_UP
+#define PEGBOX_LVL_UP   BUTTON_BOTTOMLEFT
+#endif
+#ifndef PEGBOX_LVL_DOWN
+#define PEGBOX_LVL_DOWN BUTTON_BOTTOMRIGHT
+#endif
+#ifndef PEGBOX_UP
+#define PEGBOX_UP       BUTTON_TOPMIDDLE
+#endif
+#ifndef PEGBOX_DOWN
+#define PEGBOX_DOWN     BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef PEGBOX_RIGHT
+#define PEGBOX_RIGHT    BUTTON_MIDRIGHT
+#endif
+#ifndef PEGBOX_LEFT
+#define PEGBOX_LEFT     BUTTON_MIDLEFT
+#endif
+#ifndef SAVE_TEXT
+#define SAVE_TEXT "CENTER"
+#endif
+#ifndef QUIT_TEXT
+#define QUIT_TEXT "TOPLEFT"
+#endif
+#ifndef RESTART_TEXT
+#define RESTART_TEXT "TOPRIGHT"
+#endif
+#ifndef LVL_UP_TEXT
+#define LVL_UP_TEXT "BOTTOMLEFT"
+#endif
+#ifndef LVL_DOWN_TEXT
+#define LVL_DOWN_TEXT "BOTTOMRIGHT"
+#endif
+#endif
+
 #if (LCD_WIDTH >= 320) && (LCD_HEIGHT >= 240)
 #define LEVEL_TEXT_X   59
 #define PEGS_TEXT_X    276
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index f013cef..3090e1a 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -99,13 +99,33 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define PLASMA_QUIT BUTTON_POWER
-#define PLASMA_INCREASE_FREQUENCY BUTTON_UP
-#define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN
 
-#else
-#define PLASMA_QUIT BUTTON_OFF
+// the new button definitions should be placed here
+#endif
+
+#ifdef HAVE_TOUCHPAD
+#ifndef PLASMA_QUIT
+#define PLASMA_QUIT               BUTTON_TOPLEFT
+#endif
+#ifndef PLASMA_INCREASE_FREQUENCY
+#define PLASMA_INCREASE_FREQUENCY BUTTON_MIDRIGHT
+#endif
+#ifndef PLASMA_DECREASE_FREQUENCY
+#define PLASMA_DECREASE_FREQUENCY BUTTON_MIDLEFT
+#endif
+
+#endif
+
+// if no button definitions specified and no touchpad use default
+#ifndef PLASMA_QUIT
+#define PLASMA_QUIT               BUTTON_OFF
+#endif
+#ifndef PLASMA_INCREASE_FREQUENCY
 #define PLASMA_INCREASE_FREQUENCY BUTTON_UP
+#endif
+#ifndef PLASMA_DECREASE_FREQUENCY
 #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN
+#endif
 
 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
 #define PLASMA_RC_QUIT            BUTTON_RC_STOP
@@ -128,8 +148,10 @@
 #define PLASMA_REGEN_COLORS BUTTON_SELECT
 #elif CONFIG_KEYPAD == GIGABEAT_S_PAD
 #define PLASMA_REGEN_COLORS BUTTON_SELECT
-#elif CONFIG_KEYPAD == COWOND2_PAD
-#define PLASMA_REGEN_COLORS BUTTON_SELECT
+#endif
+#ifdef HAVE_TOUCHPAD
+#ifndef PLASMA_REGEN_COLORS
+#define PLASMA_REGEN_COLORS BUTTON_CENTER
 #endif
 #endif
 
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index b1e53d3..8163915 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -148,15 +148,32 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define PONG_QUIT BUTTON_POWER
-#define PONG_LEFT_UP BUTTON_UP
-#define PONG_LEFT_DOWN BUTTON_DOWN
-#define PONG_RIGHT_UP BUTTON_LEFT
-#define PONG_RIGHT_DOWN BUTTON_RIGHT
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef PONG_QUIT
+#define PONG_QUIT       BUTTON_TOPMIDDLE
+#endif
+#ifndef PONG_LEFT_UP
+#define PONG_LEFT_UP    BUTTON_TOPLEFT
+#endif
+#ifndef PONG_LEFT_DOWN
+#define PONG_LEFT_DOWN  BUTTON_BOTTOMLEFT
+#endif
+#ifndef PONG_RIGHT_UP
+#define PONG_RIGHT_UP   BUTTON_TOPRIGHT
+#endif
+#ifndef PONG_RIGHT_DOWN
+#define PONG_RIGHT_DOWN BUTTON_BOTTOMRIGHT
+#endif
+#ifndef PONG_PAUSE
+#define PONG_PAUSE      BUTTON_CENTER
+#endif
+#endif
+
 static struct plugin_api* rb;
 
 struct pong {
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h
index 185c292..d1cea9c 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -134,17 +134,35 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define REVERSI_QUIT                BUTTON_POWER
-#define REVERSI_BUTTON_UP           BUTTON_UP
-#define REVERSI_BUTTON_DOWN         BUTTON_DOWN
-#define REVERSI_BUTTON_LEFT         BUTTON_LEFT
-#define REVERSI_BUTTON_RIGHT        BUTTON_RIGHT
-#define REVERSI_BUTTON_MAKE_MOVE    BUTTON_SELECT
 #define REVERSI_BUTTON_MENU         BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef REVERSI_QUIT
+#define REVERSI_QUIT                BUTTON_TOPLEFT
+#endif
+#ifndef REVERSI_BUTTON_UP
+#define REVERSI_BUTTON_UP           BUTTON_TOPMIDDLE
+#endif
+#ifndef REVERSI_BUTTON_DOWN
+#define REVERSI_BUTTON_DOWN         BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef REVERSI_BUTTON_LEFT
+#define REVERSI_BUTTON_LEFT         BUTTON_MIDLEFT
+#endif
+#ifndef REVERSI_BUTTON_RIGHT
+#define REVERSI_BUTTON_RIGHT        BUTTON_MIDRIGHT
+#endif
+#ifndef REVERSI_BUTTON_MAKE_MOVE
+#define REVERSI_BUTTON_MAKE_MOVE    BUTTON_CENTER
+#endif
+#ifndef REVERSI_BUTTON_MENU
+#define REVERSI_BUTTON_MENU         BUTTON_TOPRIGHT
+#endif
+#endif
 
 /* Modes for the cursor behaviour at the board edges  */
 typedef enum _cursor_wrap_mode_t {
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index 82fb758..42efa6f 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -213,18 +213,39 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define ROCKBLOX_OFF           BUTTON_POWER
-#define ROCKBLOX_ROTATE_RIGHT  BUTTON_PLUS
-#define ROCKBLOX_ROTATE_LEFT   BUTTON_MINUS
-#define ROCKBLOX_DOWN          BUTTON_DOWN
-#define ROCKBLOX_LEFT          BUTTON_LEFT
-#define ROCKBLOX_RIGHT         BUTTON_RIGHT
-#define ROCKBLOX_DROP          BUTTON_SELECT
 #define ROCKBLOX_RESTART       BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef ROCKBLOX_OFF
+#define ROCKBLOX_OFF           BUTTON_TOPLEFT
+#endif
+#ifndef ROCKBLOX_ROTATE_RIGHT
+#define ROCKBLOX_ROTATE_RIGHT  BUTTON_BOTTOMRIGHT
+#endif
+#ifndef ROCKBLOX_ROTATE_LEFT
+#define ROCKBLOX_ROTATE_LEFT   BUTTON_BOTTOMLEFT
+#endif
+#ifndef ROCKBLOX_DOWN
+#define ROCKBLOX_DOWN          BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef ROCKBLOX_LEFT
+#define ROCKBLOX_LEFT          BUTTON_MIDLEFT
+#endif
+#ifndef ROCKBLOX_RIGHT
+#define ROCKBLOX_RIGHT         BUTTON_MIDRIGHT
+#endif
+#ifndef ROCKBLOX_DROP
+#define ROCKBLOX_DROP          BUTTON_CENTER
+#endif
+#ifndef ROCKBLOX_RESTART
+#define ROCKBLOX_RESTART       BUTTON_TOPRIGHT
+#endif
+#endif
+
 #define BLOCKS_NUM  7
 #define EMPTY_BLOCK 7
 
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 2583fa3..44a1aec 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -84,8 +84,13 @@
     fd = open(optionsave, O_RDONLY);
     if(fd < 0) /* no options to read, set defaults */
     {
+#ifdef HAVE_TOUCHPAD
+        options.LEFT=BUTTON_MIDLEFT;
+        options.RIGHT=BUTTON_MIDRIGHT;
+#else
         options.LEFT=BUTTON_LEFT;
         options.RIGHT=BUTTON_RIGHT;
+#endif
 
 #if CONFIG_KEYPAD == IRIVER_H100_PAD
         options.UP=BUTTON_UP;
@@ -198,18 +203,22 @@
         options.SELECT=BUTTON_RC_MODE;
         options.MENU=BUTTON_POWER;
 #elif CONFIG_KEYPAD == COWOND2_PAD
-        options.UP=BUTTON_UP;
-        options.DOWN=BUTTON_DOWN;
 
-        options.A=BUTTON_LEFT;
-        options.B=BUTTON_RIGHT;
-        options.START=BUTTON_PLUS;
-        options.SELECT=BUTTON_SELECT;
-        options.MENU=BUTTON_MENU;
 #else
 #error No Keymap Defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+        options.UP=BUTTON_TOPMIDDLE;
+        options.DOWN=BUTTON_BOTTOMMIDDLE;
+
+        options.A=BUTTON_MIDLEFT;
+        options.B=BUTTON_MIDRIGHT;
+        options.START=BUTTON_TOPRIGHT;
+        options.SELECT=BUTTON_CENTER;
+        options.MENU=BUTTON_TOPLEFT;
+#endif
+
       options.maxskip=4;
       options.fps=0;
       options.showstats=0;
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 7e4aefd..433ebd2 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -118,19 +118,42 @@
 
 #elif ( CONFIG_KEYPAD == COWOND2_PAD )
 #define ROCKPAINT_QUIT      BUTTON_POWER
-#define ROCKPAINT_DRAW      BUTTON_SELECT
 #define ROCKPAINT_MENU      BUTTON_MENU
-#define ROCKPAINT_TOOLBAR   BUTTON_PLUS
-#define ROCKPAINT_TOOLBAR2  BUTTON_MINUS
-#define ROCKPAINT_UP        BUTTON_UP
-#define ROCKPAINT_DOWN      BUTTON_DOWN
-#define ROCKPAINT_LEFT      BUTTON_LEFT
-#define ROCKPAINT_RIGHT     BUTTON_RIGHT
 
 #else
 #error "Please define keys for this keypad"
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef ROCKPAINT_QUIT
+#define ROCKPAINT_QUIT      BUTTON_TOPLEFT
+#endif
+#ifndef ROCKPAINT_DRAW
+#define ROCKPAINT_DRAW      BUTTON_CENTER
+#endif
+#ifndef ROCKPAINT_MENU
+#define ROCKPAINT_MENU      BUTTON_TOPRIGHT
+#endif
+#ifndef ROCKPAINT_TOOLBAR
+#define ROCKPAINT_TOOLBAR   BUTTON_BOTTOMLEFT
+#endif
+#ifndef ROCKPAINT_TOOLBAR2
+#define ROCKPAINT_TOOLBAR2  BUTTON_BOTTOMRIGHT
+#endif
+#ifndef ROCKPAINT_UP
+#define ROCKPAINT_UP        BUTTON_TOPMIDDLE
+#endif
+#ifndef ROCKPAINT_DOWN
+#define ROCKPAINT_DOWN      BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef ROCKPAINT_LEFT
+#define ROCKPAINT_LEFT      BUTTON_MIDLEFT
+#endif
+#ifndef ROCKPAINT_RIGHT
+#define ROCKPAINT_RIGHT     BUTTON_MIDRIGHT
+#endif
+#endif
+
 /***********************************************************************
  * Palette Default Colors
  ***********************************************************************/
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 1510c0b..1e99a7a 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -140,17 +140,44 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define PUZZLE_QUIT BUTTON_POWER
-#define PUZZLE_LEFT BUTTON_LEFT
-#define PUZZLE_RIGHT BUTTON_RIGHT
-#define PUZZLE_UP BUTTON_UP
-#define PUZZLE_DOWN BUTTON_DOWN
-#define PUZZLE_SHUFFLE BUTTON_MENU
-#define PUZZLE_PICTURE BUTTON_SELECT
+#define PUZZLE_QUIT_TEXT "[POWER]"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef PUZZLE_QUIT
+#define PUZZLE_QUIT    BUTTON_TOPLEFT
+#endif
+#ifndef PUZZLE_LEFT
+#define PUZZLE_LEFT    BUTTON_MIDLEFT
+#endif
+#ifndef PUZZLE_RIGHT
+#define PUZZLE_RIGHT   BUTTON_MIDRIGHT
+#endif
+#ifndef PUZZLE_UP
+#define PUZZLE_UP      BUTTON_TOPMIDDLE
+#endif
+#ifndef PUZZLE_DOWN
+#define PUZZLE_DOWN    BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef PUZZLE_SHUFFLE
+#define PUZZLE_SHUFFLE BUTTON_BOTTOMLEFT
+#endif
+#ifndef PUZZLE_PICTURE
+#define PUZZLE_PICTURE BUTTON_CENTER
+#endif
+#ifndef PUZZLE_QUIT_TEXT 
+#define PUZZLE_QUIT_TEXT "[TOPLEFT]"
+#endif
+#ifndef PUZZLE_SHUFFLE_TEXT 
+#define PUZZLE_SHUFFLE_TEXT "[BOTTOMLEFT]"
+#endif
+#ifndef PUZZLE_PICTURE_TEXT 
+#define PUZZLE_PICTURE_TEXT "[CENTER]"
+#endif
+#endif
 
 #include "sliding_puzzle.h"
 #define IMAGE_WIDTH BMPWIDTH_sliding_puzzle
@@ -647,6 +674,11 @@
         rb->lcd_putsxy(0, 28, "[MODE] shuffle");
         rb->lcd_putsxy(0, 38, "[MENU] change pic");
 #endif
+#ifdef HAVE_TOUCHPAD
+        rb->lcd_putsxy(0, 18, PUZZLE_QUIT_TEXT " to stop");
+        rb->lcd_putsxy(0, 28, PUZZLE_SHUFFLE_TEXT " shuffle");
+        rb->lcd_putsxy(0, 38, PUZZLE_PICTURE_TEXT " change pic");
+#endif
 #ifdef HAVE_ALBUMART
         rb->lcd_putsxy(0,48,"    pic->albumart->num");
 #else
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index fffb70c..6203a07 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -142,16 +142,32 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define SNAKE_QUIT BUTTON_POWER
-#define SNAKE_LEFT BUTTON_LEFT
-#define SNAKE_RIGHT BUTTON_RIGHT
-#define SNAKE_UP   BUTTON_UP
-#define SNAKE_DOWN BUTTON_DOWN
-#define SNAKE_PLAYPAUSE BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef SNAKE_QUIT
+#define SNAKE_QUIT      BUTTON_TOPLEFT
+#endif
+#ifndef SNAKE_LEFT
+#define SNAKE_LEFT      BUTTON_MIDLEFT
+#endif
+#ifndef SNAKE_RIGHT
+#define SNAKE_RIGHT     BUTTON_MIDRIGHT
+#endif
+#ifndef SNAKE_UP
+#define SNAKE_UP        BUTTON_TOPMIDDLE
+#endif
+#ifndef SNAKE_DOWN
+#define SNAKE_DOWN      BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SNAKE_PLAYPAUSE
+#define SNAKE_PLAYPAUSE BUTTON_CENTER
+#endif
+#endif
+
 #define BOARD_WIDTH (LCD_WIDTH/4)
 #define BOARD_HEIGHT (LCD_HEIGHT/4)
 
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 0c2b888..0452294 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -289,23 +289,51 @@
 #define SNAKE2_PLAYPAUSE_TEXT "Play"
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
-#define SNAKE2_LEFT BUTTON_LEFT
-#define SNAKE2_RIGHT BUTTON_RIGHT
-#define SNAKE2_UP   BUTTON_UP
-#define SNAKE2_DOWN BUTTON_DOWN
 #define SNAKE2_QUIT BUTTON_POWER
-#define SNAKE2_LEVEL_UP BUTTON_UP
-#define SNAKE2_LEVEL_DOWN BUTTON_DOWN
-#define SNAKE2_MAZE_NEXT BUTTON_RIGHT
-#define SNAKE2_MAZE_LAST BUTTON_LEFT
-#define SNAKE2_SELECT_TYPE BUTTON_MENU
-#define SNAKE2_PLAYPAUSE BUTTON_SELECT
-#define SNAKE2_PLAYPAUSE_TEXT "Select"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef SNAKE2_LEFT 
+#define SNAKE2_LEFT        BUTTON_MIDLEFT
+#endif
+#ifndef SNAKE2_RIGHT
+#define SNAKE2_RIGHT       BUTTON_MIDRIGHT
+#endif
+#ifndef SNAKE2_UP
+#define SNAKE2_UP          BUTTON_TOPMIDDLE
+#endif
+#ifndef SNAKE2_DOWN
+#define SNAKE2_DOWN        BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SNAKE2_QUIT
+#define SNAKE2_QUIT        BUTTON_TOPLEFT
+#endif
+#ifndef SNAKE2_LEVEL_UP
+#define SNAKE2_LEVEL_UP    BUTTON_TOPRIGHT
+#endif
+#ifndef SNAKE2_LEVEL_DOWN
+#define SNAKE2_LEVEL_DOWN  BUTTON_TOPLEFT
+#endif
+#ifndef SNAKE2_MAZE_NEXT
+#define SNAKE2_MAZE_NEXT   BUTTON_TOPMIDDLE
+#endif
+#ifndef SNAKE2_MAZE_LAST
+#define SNAKE2_MAZE_LAST   BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SNAKE2_SELECT_TYPE
+#define SNAKE2_SELECT_TYPE BUTTON_BOTTOMLEFT
+#endif
+#ifndef SNAKE2_PLAYPAUSE
+#define SNAKE2_PLAYPAUSE   BUTTON_CENTER
+#endif
+#ifndef SNAKE2_PLAYPAUSE_TEXT
+#define SNAKE2_PLAYPAUSE_TEXT "CENTER"
+#endif
+#endif
+
 static int max_levels = 0;
 static char (*level_cache)[HEIGHT][WIDTH];
 
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index c8a6ba7..2b12a3d 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -278,25 +278,52 @@
 #define SOKOBAN_RC_MENU BUTTON_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define SOKOBAN_LEFT BUTTON_LEFT
-#define SOKOBAN_RIGHT BUTTON_RIGHT
-#define SOKOBAN_UP BUTTON_UP
-#define SOKOBAN_DOWN BUTTON_DOWN
 #define SOKOBAN_MENU BUTTON_MENU
-#define SOKOBAN_UNDO_PRE BUTTON_PLUS
-#define SOKOBAN_UNDO (BUTTON_LEFT|BUTTON_MENU)
-#define SOKOBAN_REDO (BUTTON_RIGHT | BUTTON_MENU)
-#define SOKOBAN_LEVEL_DOWN (BUTTON_MENU | BUTTON_DOWN)
-#define SOKOBAN_LEVEL_UP (BUTTON_MENU | BUTTON_UP)
-#define SOKOBAN_LEVEL_REPEAT (BUTTON_SELECT|BUTTON_MENU)
-#define SOKOBAN_PAUSE BUTTON_SELECT
-#define BUTTON_SAVE BUTTON_SELECT
-#define BUTTON_SAVE_NAME "SELECT"
+#define SOKOBAN_MENU_NAME "[MENU]"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef SOKOBAN_LEFT
+#define SOKOBAN_LEFT          BUTTON_MIDLEFT
+#endif
+#ifndef SOKOBAN_RIGHT
+#define SOKOBAN_RIGHT         BUTTON_MIDRIGHT
+#endif
+#ifndef SOKOBAN_UP
+#define SOKOBAN_UP            BUTTON_TOPMIDDLE
+#endif
+#ifndef SOKOBAN_DOWN
+#define SOKOBAN_DOWN          BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SOKOBAN_MENU
+#define SOKOBAN_MENU          BUTTON_TOPLEFT
+#define SOKOBAN_MENU_NAME     "[TOPLEFT]"
+#endif
+#ifndef SOKOBAN_UNDO
+#define SOKOBAN_UNDO          BUTTON_BOTTOMRIGHT
+#define SOKOBAN_UNDO_NAME     "[BOTTOMRIGHT]"
+#endif
+#ifndef SOKOBAN_REDO
+#define SOKOBAN_REDO          BUTTON_BOTTOMLEFT
+#define SOKOBAN_REDO_NAME     "[BOTTOMLEFT]"
+#endif
+#ifndef SOKOBAN_PAUSE
+#define SOKOBAN_PAUSE         BUTTON_CENTER
+#define SOKOBAN_PAUSE_NAME    "[CENTER]"
+#endif
+#ifndef SOKOBAN_LEVEL_REPEAT
+#define SOKOBAN_LEVEL_REPEAT  BUTTON_TOPRIGHT
+#define SOKOBAN_LEVEL_REPEAT_NAME "[TOPRIGHT]"
+#endif
+#ifndef BUTTON_SAVE
+#define BUTTON_SAVE           BUTTON_CENTER
+#define BUTTON_SAVE_NAME      "CENTER"
+#endif
+#endif
+
 #define SOKOBAN_FONT FONT_SYSFIXED
 
 
@@ -1261,6 +1288,14 @@
                 rb->lcd_putsxy(3, 56, "[SELECT+UP] Next Level");
 #endif
 
+#ifdef HAVE_TOUCHPAD
+                rb->lcd_putsxy(3,  6, SOKOBAN_MENU_NAME " Menu");
+                rb->lcd_putsxy(3, 16, SOKOBAN_UNDO_NAME " Undo");
+                rb->lcd_putsxy(3, 26, SOKOBAN_REDO_NAME " Redo");
+                rb->lcd_putsxy(3, 36, SOKOBAN_PAUSE_NAME " Pause");
+                rb->lcd_putsxy(3, 46, SOKOBAN_LEVEL_REPEAT_NAME " Restart Level");
+#endif
+
                 FOR_NB_SCREENS(i)
                     rb->screens[i]->update();
 
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 40f9a24..0907054 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -300,29 +300,50 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #   define SOL_QUIT          BUTTON_POWER
-#   define SOL_UP            BUTTON_UP
-#   define SOL_DOWN          BUTTON_DOWN
-#   define SOL_LEFT_PRE      BUTTON_LEFT
-#   define SOL_LEFT          (BUTTON_LEFT | BUTTON_REL)
-#   define SOL_RIGHT_PRE     BUTTON_RIGHT
-#   define SOL_RIGHT         (BUTTON_RIGHT | BUTTON_REL)
-#   define SOL_MOVE          BUTTON_SELECT
-#   define SOL_DRAW_PRE      BUTTON_LEFT
-#   define SOL_DRAW          (BUTTON_LEFT | BUTTON_MENU)
-#   define SOL_REM2CUR       BUTTON_PLUS
-#   define SOL_CUR2STACK     BUTTON_MINUS
-#   define SOL_REM2STACK_PRE BUTTON_RIGHT
-#   define SOL_REM2STACK     (BUTTON_RIGHT | BUTTON_MENU)
-#   define HK_MOVE           "PLAY"
-#   define HK_DRAW           "LEFT.."
-#   define HK_REM2CUR        "FF"
-#   define HK_CUR2STACK      "REW"
-#   define HK_REM2STACK      "RIGHT.."
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+//#ifndef SOL_QUIT
+//#   define SOL_QUIT          BUTTON_TOPLEFT
+//endif
+#ifndef SOL_UP
+#   define SOL_UP            BUTTON_TOPMIDDLE
+#endif
+#ifndef SOL_DOWN
+#   define SOL_DOWN          BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SOL_LEFT
+#   define SOL_LEFT          BUTTON_MIDLEFT
+#endif
+#ifndef SOL_RIGHT
+#   define SOL_RIGHT         BUTTON_MIDRIGHT
+#endif
+#ifndef SOL_MOVE
+#   define SOL_MOVE          BUTTON_CENTER
+#   define HK_MOVE           "CENTRE"
+#endif
+#ifndef SOL_DRAW
+#   define SOL_DRAW          BUTTON_TOPLEFT
+#   define HK_DRAW           "TOPLEFT"
+#endif
+#ifndef SOL_REM2CUR
+#   define SOL_REM2CUR       BUTTON_TOPRIGHT
+#   define HK_REM2CUR        "TOPRIGHT"
+#endif
+#ifndef SOL_CUR2STACK
+#   define SOL_CUR2STACK     BUTTON_BOTTOMLEFT
+#   define HK_CUR2STACK      "BOTTOMLEFT"
+#endif
+#ifndef SOL_REM2STACK
+#   define SOL_REM2STACK     BUTTON_BOTTOMRIGHT
+#   define HK_REM2STACK      "BOTTOMRIGHT"
+#endif
+
+#endif
+
 #ifndef HK_LR
 #   define HK_LR "LEFT/RIGHT"
 #endif
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c
index b47aba3..bfddb45 100644
--- a/apps/plugins/spacerocks.c
+++ b/apps/plugins/spacerocks.c
@@ -201,22 +201,48 @@
 #define AST_FIRE_REP (BUTTON_RC_MODE | BUTTON_REPEAT)
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
-#define AST_PAUSE BUTTON_SELECT
 #define AST_QUIT BUTTON_POWER
-#define AST_THRUST_REP BUTTON_UP | BUTTON_MENU
-#define AST_THRUST BUTTON_UP
-#define AST_HYPERSPACE BUTTON_DOWN
-#define AST_LEFT BUTTON_LEFT 
-#define AST_LEFT_REP BUTTON_LEFT | BUTTON_MENU
-#define AST_RIGHT BUTTON_RIGHT
-#define AST_RIGHT_REP (BUTTON_RIGHT | BUTTON_MENU)
-#define AST_FIRE BUTTON_PLUS
-#define AST_FIRE_REP BUTTON_PLUS | BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef AST_PAUSE
+#define AST_PAUSE       BUTTON_CENTER
+#endif
+#ifndef AST_QUIT
+#define AST_QUIT        BUTTON_TOPLEFT
+#endif
+#ifndef AST_THRUST_REP
+#define AST_THRUST_REP (BUTTON_TOPMIDDLE | BUTTON_REPEAT)
+#endif
+#ifndef AST_THRUST
+#define AST_THRUST      BUTTON_TOPMIDDLE
+#endif
+#ifndef AST_HYPERSPACE
+#define AST_HYPERSPACE  BUTTON_TOPRIGHT
+#endif
+#ifndef AST_LEFT
+#define AST_LEFT        BUTTON_MIDLEFT 
+#endif
+#ifndef AST_LEFT_REP
+#define AST_LEFT_REP   (BUTTON_MIDLEFT | BUTTON_REPEAT)
+#endif
+#ifndef AST_RIGHT
+#define AST_RIGHT       BUTTON_MIDRIGHT
+#endif
+#ifndef AST_RIGHT_REP
+#define AST_RIGHT_REP  (BUTTON_MIDRIGHT | BUTTON_REPEAT)
+#endif
+#ifndef AST_FIRE
+#define AST_FIRE        BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef AST_FIRE_REP
+#define AST_FIRE_REP   (BUTTON_BOTTOMMIDDLE | BUTTON_MENU)
+#endif
+#endif
+
 #define ABS(x) ((x)>0?(x):-(x))
 
 #define RES MAX(LCD_WIDTH, LCD_HEIGHT)
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index c2546d2..46780f9 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -228,20 +228,51 @@
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 
 #define STAR_QUIT           BUTTON_POWER
-#define STAR_LEFT           BUTTON_LEFT
-#define STAR_RIGHT          BUTTON_RIGHT
-#define STAR_UP             BUTTON_UP
-#define STAR_DOWN           BUTTON_DOWN
-#define STAR_TOGGLE_CONTROL BUTTON_SELECT
-#define STAR_LEVEL_UP       BUTTON_PLUS
-#define STAR_LEVEL_DOWN     BUTTON_MINUS
-#define STAR_LEVEL_REPEAT   (BUTTON_SELECT | BUTTON_MENU)
+#define STAR_QUIT_NAME      "[POWER]"
 #define STAR_MENU_RUN       BUTTON_MENU
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+//#ifndef STAR_QUIT
+//#define STAR_QUIT           BUTTON_TOPLEFT
+//#define STAR_QUIT_NAME           "[TOPLEFT]"
+//#endif
+#ifndef STAR_MENU_RUN
+#define STAR_MENU_RUN       BUTTON_TOPRIGHT
+#endif
+#ifndef STAR_LEFT
+#define STAR_LEFT           BUTTON_MIDLEFT
+#endif
+#ifndef STAR_RIGHT
+#define STAR_RIGHT          BUTTON_MIDRIGHT
+#endif
+#ifndef STAR_UP
+#define STAR_UP             BUTTON_TOPMIDDLE
+#endif
+#ifndef STAR_DOWN
+#define STAR_DOWN           BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef STAR_TOGGLE_CONTROL
+#define STAR_TOGGLE_CONTROL BUTTON_CENTER
+#define STAR_TOGGLE_CONTROL_NAME "[CENTER]"
+#endif
+#ifndef STAR_LEVEL_UP
+#define STAR_LEVEL_UP       BUTTON_TOPLEFT
+#define STAR_LEVEL_UP_NAME  "[TOPLEFT]"
+#endif
+#ifndef STAR_LEVEL_DOWN
+#define STAR_LEVEL_DOWN     BUTTON_BOTTOMLEFT
+#define STAR_LEVEL_DOWN_NAME "[BOTTOMLEFT]"
+#endif
+#ifndef STAR_LEVEL_REPEAT
+#define STAR_LEVEL_REPEAT   BUTTON_BOTTOMRIGHT
+#define STAR_LEVEL_REPEAT_NAME "[BOTTOMRIGHT]"
+#endif
+#endif
+
 /* function returns because of USB? */
 static bool usb_detected = false;
 
@@ -1041,6 +1072,14 @@
                                   "[PLAY+RIGHT] Reset level\n"
                                   "[PLAY+UP] Next level", true);
 #endif
+#ifdef HAVE_TOUCHPAD
+                star_display_text("KEYS\n\n"
+                                  STAR_TOGGLE_CONTROL_NAME " Toggle Control\n"
+                                  STAR_QUIT_NAME " Exit\n"
+                                  STAR_LEVEL_DOWN_NAME " Prev. level\n"
+                                  STAR_LEVEL_REPEAT_NAME " Reset level\n"
+                                  STAR_LEVEL_UP_NAME " Next level", true);
+#endif
                 break;
             default:
                 menu_quit = true;
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 4f2c8b1..754af24 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -88,28 +88,56 @@
 #define STARFIELD_TOGGLE_COLOR BUTTON_RC_MODE
 #elif (CONFIG_KEYPAD == COWOND2_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
-#define STARFIELD_TOGGLE_COLOR BUTTON_MENU
+#endif
 
-#else
+#ifdef HAVE_TOUCHPAD
+#ifndef STARFIELD_QUIT
+#define STARFIELD_QUIT              BUTTON_TOPLEFT
+#endif
+#ifndef STARFIELD_INCREASE_ZMOVE
+#define STARFIELD_INCREASE_ZMOVE    BUTTON_TOPMIDDLE
+#endif
+#ifndef STARFIELD_DECREASE_ZMOVE
+#define STARFIELD_DECREASE_ZMOVE    BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef STARFIELD_INCREASE_NB_STARS
+#define STARFIELD_INCREASE_NB_STARS BUTTON_MIDRIGHT
+#endif
+#ifndef STARFIELD_DECREASE_NB_STARS
+#define STARFIELD_DECREASE_NB_STARS BUTTON_MIDLEFT
+#endif
+#ifndef STARFIELD_TOGGLE_COLOR
+#define STARFIELD_TOGGLE_COLOR      BUTTON_CENTER
+#endif
+#endif
+
+#ifndef STARFIELD_QUIT
 #define STARFIELD_QUIT BUTTON_OFF
+#endif
+#ifndef STARFIELD_INCREASE_ZMOVE
 #define STARFIELD_INCREASE_ZMOVE BUTTON_UP
+#endif
+#ifndef STARFIELD_DECREASE_ZMOVE
 #define STARFIELD_DECREASE_ZMOVE BUTTON_DOWN
+#endif
+#ifndef STARFIELD_INCREASE_NB_STARS
 #define STARFIELD_INCREASE_NB_STARS BUTTON_RIGHT
+#endif
+#ifndef STARFIELD_DECREASE_NB_STARS
 #define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT
+#endif
+
+#ifndef STARFIELD_TOGGLE_COLOR
 #ifdef BUTTON_SELECT
 #define STARFIELD_TOGGLE_COLOR BUTTON_SELECT
 #else
 #define STARFIELD_TOGGLE_COLOR BUTTON_PLAY
 #endif
+#endif
 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
 #define STARFIELD_RC_QUIT BUTTON_RC_STOP
 #endif
 
-#endif
 
 #define LCD_CENTER_X (LCD_WIDTH/2)
 #define LCD_CENTER_Y (LCD_HEIGHT/2)
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index d4d890d..18ad1c4 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -146,15 +146,31 @@
 #define STOPWATCH_RC_QUIT BUTTON_REC
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define STOPWATCH_QUIT BUTTON_POWER
-#define STOPWATCH_START_STOP BUTTON_SELECT
-#define STOPWATCH_RESET_TIMER BUTTON_MENU
-#define STOPWATCH_LAP_TIMER BUTTON_PLUS
-#define STOPWATCH_SCROLL_UP BUTTON_UP
-#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef STOPWATCH_QUIT
+#define STOPWATCH_QUIT        BUTTON_TOPLEFT
+#endif
+#ifndef STOPWATCH_START_STOP
+#define STOPWATCH_START_STOP  BUTTON_CENTER
+#endif
+#ifndef STOPWATCH_RESET_TIMER
+#define STOPWATCH_RESET_TIMER BUTTON_MIDRIGHT
+#endif
+#ifndef STOPWATCH_LAP_TIMER
+#define STOPWATCH_LAP_TIMER   BUTTON_MIDLEFT
+#endif
+#ifndef STOPWATCH_SCROLL_UP
+#define STOPWATCH_SCROLL_UP   BUTTON_TOPMIDDLE
+#endif
+#ifndef STOPWATCH_SCROLL_DOWN
+#define STOPWATCH_SCROLL_DOWN BUTTON_BOTTOMMIDDLE
+#endif
+#endif
+
 static struct plugin_api* rb;
 
 static int stopwatch = 0;
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 3fc8dbe..2cd9198 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -172,18 +172,39 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 #define SUDOKU_BUTTON_QUIT BUTTON_POWER
-#define SUDOKU_BUTTON_UP BUTTON_UP
-#define SUDOKU_BUTTON_DOWN BUTTON_DOWN
-#define SUDOKU_BUTTON_LEFT BUTTON_LEFT
-#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT
-#define SUDOKU_BUTTON_TOGGLE BUTTON_PLUS
 #define SUDOKU_BUTTON_MENU BUTTON_MENU
-#define SUDOKU_BUTTON_POSSIBLE BUTTON_MINUS
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef SUDOKU_BUTTON_QUIT
+#define SUDOKU_BUTTON_QUIT     BUTTON_TOPLEFT
+#endif
+#ifndef SUDOKU_BUTTON_UP
+#define SUDOKU_BUTTON_UP       BUTTON_TOPMIDDLE
+#endif
+#ifndef SUDOKU_BUTTON_DOWN
+#define SUDOKU_BUTTON_DOWN     BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SUDOKU_BUTTON_LEFT
+#define SUDOKU_BUTTON_LEFT     BUTTON_MIDLEFT
+#endif
+#ifndef SUDOKU_BUTTON_RIGHT
+#define SUDOKU_BUTTON_RIGHT    BUTTON_MIDRIGHT
+#endif
+#ifndef SUDOKU_BUTTON_TOGGLE
+#define SUDOKU_BUTTON_TOGGLE   BUTTON_CENTER
+#endif
+#ifndef SUDOKU_BUTTON_MENU
+#define SUDOKU_BUTTON_MENU     BUTTON_TOPRIGHT
+#endif
+#ifndef SUDOKU_BUTTON_POSSIBLE
+#define SUDOKU_BUTTON_POSSIBLE BUTTON_BOTTOMLEFT
+#endif
+#endif
+
 struct sudoku_state_t {
   char filename[MAX_PATH];  /* Filename */
   char startboard[9][9];    /* The initial state of the game */
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c
index 9e3f984..e99d456 100644
--- a/apps/plugins/superdom.c
+++ b/apps/plugins/superdom.c
@@ -128,15 +128,31 @@
 #define SUPERDOM_CANCEL BUTTON_BACK
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define SUPERDOM_OK BUTTON_SELECT
-#define SUPERDOM_UP BUTTON_UP
-#define SUPERDOM_LEFT BUTTON_LEFT
-#define SUPERDOM_RIGHT BUTTON_RIGHT
-#define SUPERDOM_DOWN BUTTON_DOWN
-#define SUPERDOM_CANCEL BUTTON_MENU
+#define SUPERDOM_CANCEL BUTTON_POWER
 
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef SUPERDOM_OK
+#define SUPERDOM_OK     BUTTON_CENTER
+#endif
+#ifndef SUPERDOM_UP
+#define SUPERDOM_UP     BUTTON_TOPMIDDLE
+#endif
+#ifndef SUPERDOM_LEFT
+#define SUPERDOM_LEFT   BUTTON_MIDLEFT
+#endif
+#ifndef SUPERDOM_RIGHT
+#define SUPERDOM_RIGHT  BUTTON_MIDRIGHT
+#endif
+#ifndef SUPERDOM_DOWN
+#define SUPERDOM_DOWN   BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef SUPERDOM_CANCEL
+#define SUPERDOM_CANCEL BUTTON_TOPLEFT
+#endif
+#endif
+
 #define SUPERDOM_QUIT 23
 
 void gen_interest(void);
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index a2afbc0..885ac70 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -246,17 +246,36 @@
 
 #elif CONFIG_KEYPAD == COWOND2_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_MENU BUTTON_MENU
-#define VIEWER_AUTOSCROLL BUTTON_SELECT
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef VIEWER_QUIT
+#define VIEWER_QUIT         BUTTON_TOPLEFT
+#endif
+#ifndef VIEWER_PAGE_UP
+#define VIEWER_PAGE_UP      BUTTON_TOPMIDDLE
+#endif
+#ifndef VIEWER_PAGE_DOWN
+#define VIEWER_PAGE_DOWN    BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef VIEWER_SCREEN_LEFT
+#define VIEWER_SCREEN_LEFT  BUTTON_MIDLEFT
+#endif
+#ifndef VIEWER_SCREEN_RIGHT
+#define VIEWER_SCREEN_RIGHT BUTTON_MIDRIGHT
+#endif
+#ifndef VIEWER_MENU
+#define VIEWER_MENU         BUTTON_TOPRIGHT
+#endif
+#ifndef VIEWER_AUTOSCROLL
+#define VIEWER_AUTOSCROLL   BUTTON_CENTER
+#endif
+#endif
+
 /* stuff for the bookmarking */
 struct bookmarked_file_info {
     long file_position;
@@ -1620,3 +1639,4 @@
     return PLUGIN_OK;
 }
 
+
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 5a893d7..bdbab8c 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -202,21 +202,42 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 #define VUMETER_QUIT BUTTON_POWER
-#define VUMETER_HELP BUTTON_SELECT
 #define VUMETER_MENU BUTTON_MENU
-#define VUMETER_MENU_EXIT BUTTON_LEFT
-#define VUMETER_MENU_EXIT2 BUTTON_POWER
-#define VUMETER_UP BUTTON_UP
-#define VUMETER_DOWN BUTTON_DOWN
-#define LABEL_HELP "SELECT"
+#define VUMETER_MENU_EXIT BUTTON_POWER
 #define LABEL_QUIT "POWER"
 #define LABEL_MENU "MENU"
-#define LABEL_VOLUME "UP/DOWN"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef VUMETER_QUIT
+#define VUMETER_QUIT      BUTTON_TOPLEFT
+#define LABEL_QUIT        "TOPLEFT"
+#endif
+#ifndef VUMETER_HELP
+#define VUMETER_HELP      BUTTON_CENTER
+#define LABEL_HELP        "CENTRE"
+#endif
+#ifndef VUMETER_MENU
+#define VUMETER_MENU      BUTTON_TOPRIGHT
+#define LABEL_MENU        "TOPRIGHT"
+#endif
+#ifndef VUMETER_MENU_EXIT
+#define VUMETER_MENU_EXIT BUTTON_TOPLEFT
+#endif
+#ifndef VUMETER_UP
+#define VUMETER_UP        BUTTON_TOPMIDDLE
+#endif
+#ifndef VUMETER_DOWN
+#define VUMETER_DOWN      BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef LABEL_VOLUME
+#define LABEL_VOLUME      "UP/DOWN"
+#endif
+#endif
+
 const struct plugin_api* rb;
 
 #if defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index 8b752bf..f84fad9 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -217,21 +217,44 @@
 
 #elif (CONFIG_KEYPAD == COWOND2_PAD)
 
-#define BTN_DIR_UP BUTTON_UP
-#define BTN_DIR_DOWN BUTTON_DOWN
-#define BTN_DIR_LEFT BUTTON_LEFT
-#define BTN_DIR_RIGHT BUTTON_RIGHT
-#define BTN_STARTPAUSE BUTTON_SELECT
 #define BTN_QUIT BUTTON_POWER
-#define BTN_STOPRESET BUTTON_PLUS
-
-#define PLAYERS_TEXT "Up/Down"
-#define WORMS_TEXT "Left/Right"
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef BTN_DIR_UP
+#define BTN_DIR_UP     BUTTON_TOPMIDDLE
+#endif
+#ifndef BTN_DIR_DOWN
+#define BTN_DIR_DOWN   BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef BTN_DIR_LEFT
+#define BTN_DIR_LEFT   BUTTON_MIDLEFT
+#endif
+#ifndef BTN_DIR_RIGHT
+#define BTN_DIR_RIGHT  BUTTON_MIDRIGHT
+#endif
+#ifndef BTN_STARTPAUSE
+#define BTN_STARTPAUSE BUTTON_CENTER
+#endif
+#ifndef BTN_QUIT
+#define BTN_QUIT       BUTTON_TOPLEFT
+#endif
+#ifndef BTN_STOPRESET
+#define BTN_STOPRESET  BUTTON_TOPRIGHT
+
+#endif
+#ifndef PLAYERS_TEXT
+#define PLAYERS_TEXT   "Up/Down"
+#endif
+#ifndef WORMS_TEXT
+#define WORMS_TEXT     "Left/Right"
+#endif
+#endif
+
+
 #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
 #define FOOD_SIZE 3
 #define ARGH_SIZE 4
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 879d0e6..331650e 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -142,16 +142,32 @@
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
 #define QUIT BUTTON_POWER
-#define LEFT BUTTON_LEFT
-#define RIGHT BUTTON_RIGHT
-#define UP BUTTON_UP
-#define DOWN BUTTON_DOWN
-#define PAUSE BUTTON_SELECT
 
 #else
 #error No keymap defined!
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef QUIT
+#define QUIT  BUTTON_TOPLEFT
+#endif
+#ifndef LEFT
+#define LEFT  BUTTON_MIDLEFT
+#endif
+#ifndef RIGHT
+#define RIGHT BUTTON_MIDRIGHT
+#endif
+#ifndef UP
+#define UP    BUTTON_TOPMIDDLE
+#endif
+#ifndef DOWN
+#define DOWN  BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef PAUSE
+#define PAUSE BUTTON_CENTER
+#endif
+#endif
+
 #define MOVE_NO 0               /* player movement */
 #define MOVE_UP 1               /*    1    */
 #define MOVE_DN 2               /*  3 0 4  */
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index 791149c..49156c2 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -103,16 +103,32 @@
 #define ZX_MENU         BUTTON_RC_REC
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
-#define ZX_UP           BUTTON_UP
-#define ZX_DOWN         BUTTON_DOWN
-#define ZX_LEFT         BUTTON_LEFT
-#define ZX_RIGHT        BUTTON_RIGHT
-#define ZX_SELECT       BUTTON_SELECT
-#define ZX_MENU         BUTTON_MENU
+#define ZX_MENU         (BUTTON_MENU|BUTTON_REL)
 
 #else
 #error Keymap not defined!
 
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef ZX_UP
+#define ZX_UP           BUTTON_TOPMIDDLE
+#endif
+#ifndef ZX_DOWN
+#define ZX_DOWN         BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef ZX_LEFT
+#define ZX_LEFT         BUTTON_MIDLEFT
+#endif
+#ifndef ZX_RIGHT
+#define ZX_RIGHT        BUTTON_MIDRIGHT
+#endif
+#ifndef ZX_SELECT
+#define ZX_SELECT       BUTTON_CENTER
+#endif
+#ifndef ZX_MENU
+#define ZX_MENU         (BUTTON_TOPLEFT|BUTTON_REL)
+#endif
+#endif
+
 #endif
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index f1de0a0..33d4451 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -124,17 +124,30 @@
 
 #elif CONFIG_KEYPAD == COWOND2_PAD
 
-/* TODO: Check keyboard mappings */
-
-#define KBD_SELECT BUTTON_SELECT
 #define KBD_ABORT BUTTON_POWER
-#define KBD_LEFT BUTTON_LEFT
-#define KBD_RIGHT BUTTON_RIGHT
-#define KBD_UP BUTTON_UP
-#define KBD_DOWN BUTTON_DOWN
 
 #endif
 
+#ifdef HAVE_TOUCHPAD
+#ifndef KBD_SELECT
+#define KBD_SELECT BUTTON_CENTER
+#endif
+#ifndef KBD_ABORT
+#define KBD_ABORT  BUTTON_TOPLEFT
+#endif
+#ifndef KBD_LEFT
+#define KBD_LEFT   BUTTON_MIDLEFT
+#endif
+#ifndef KBD_RIGHT
+#define KBD_RIGHT  BUTTON_MIDRIGHT
+#endif
+#ifndef KBD_UP
+#define KBD_UP     BUTTON_TOPMIDDLE
+#endif
+#ifndef KBD_DOWN
+#define KBD_DOWN   BUTTON_BOTTOMMIDDLE
+#endif
+#endif
 
 struct keyboard_parameters {
     const unsigned char* default_kbd;
diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h
index 051ed39..f947a23 100644
--- a/firmware/target/arm/tcc780x/cowond2/button-target.h
+++ b/firmware/target/arm/tcc780x/cowond2/button-target.h
@@ -36,10 +36,9 @@
 #define BUTTON_MINUS      0x00000004
 #define BUTTON_MENU       0x00000008
 
-/* compatibility hacks These definatly need fixing */
+/* Compatibility hacks for flipping. Needs a somewhat better fix. */
 #define BUTTON_LEFT  BUTTON_MIDLEFT
 #define BUTTON_RIGHT BUTTON_MIDRIGHT
-#define BUTTON_SELECT BUTTON_CENTER
 #define BUTTON_UP    BUTTON_TOPMIDDLE
 #define BUTTON_DOWN  BUTTON_BOTTOMMIDDLE