diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2008-09-16 08:14:31 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2008-09-16 08:14:31 +0000 |
commit | f08eed6ec5204a48d2724770e470e5382caf4c05 (patch) | |
tree | 9becbc485b4b4c4b2182cca870f7cc3965151241 | |
parent | 1a08f46329e9f6d7bd55a8a9ad45db27df8a7593 (diff) | |
download | rockbox-f08eed6ec5204a48d2724770e470e5382caf4c05.tar.gz rockbox-f08eed6ec5204a48d2724770e470e5382caf4c05.zip |
D2/Touchscreen keymap improvements: onscreen keyboard is now usable; PLAY/pause now mapped to TOPRIGHT; Usable defaults in Rockboy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18529 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/keymaps/keymap-cowond2.c | 7 | ||||
-rw-r--r-- | apps/keymaps/keymap-touchscreen.c | 34 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 12 |
3 files changed, 45 insertions, 8 deletions
diff --git a/apps/keymaps/keymap-cowond2.c b/apps/keymaps/keymap-cowond2.c index 2e412458e1..7ba2d8b02b 100644 --- a/apps/keymaps/keymap-cowond2.c +++ b/apps/keymaps/keymap-cowond2.c | |||
@@ -137,8 +137,13 @@ static const struct button_mapping button_context_pitchscreen[] = { | |||
137 | }; /* button_context_pitchcreen */ | 137 | }; /* button_context_pitchcreen */ |
138 | 138 | ||
139 | static const struct button_mapping button_context_keyboard[] = { | 139 | static const struct button_mapping button_context_keyboard[] = { |
140 | { ACTION_KBD_PAGE_FLIP, BUTTON_MENU, BUTTON_NONE }, | ||
141 | { ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS, BUTTON_NONE }, | ||
142 | { ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE }, | ||
143 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS, BUTTON_NONE }, | ||
144 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE }, | ||
145 | |||
140 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 146 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
141 | //LAST_ITEM_IN_LIST | ||
142 | }; /* button_context_keyboard */ | 147 | }; /* button_context_keyboard */ |
143 | 148 | ||
144 | const struct button_mapping* target_get_context_mapping(int context) | 149 | const struct button_mapping* target_get_context_mapping(int context) |
diff --git a/apps/keymaps/keymap-touchscreen.c b/apps/keymaps/keymap-touchscreen.c index a56eefd427..5392431026 100644 --- a/apps/keymaps/keymap-touchscreen.c +++ b/apps/keymaps/keymap-touchscreen.c | |||
@@ -59,17 +59,19 @@ static const struct button_mapping button_context_standard[] = { | |||
59 | { ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER }, | 59 | { ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER }, |
60 | { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, | 60 | { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, |
61 | { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_MIDRIGHT }, | 61 | { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_MIDRIGHT }, |
62 | { ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE }, | ||
63 | { ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
62 | 64 | ||
63 | { ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE }, | 65 | { ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE }, |
64 | { ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE }, | 66 | { ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE }, |
65 | { ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, | 67 | { ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, |
66 | { ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE }, | 68 | |
67 | { ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
68 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD) | 69 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD) |
69 | }; /* button_context_standard */ | 70 | }; /* button_context_standard */ |
70 | 71 | ||
71 | static const struct button_mapping button_context_wps[] = { | 72 | static const struct button_mapping button_context_wps[] = { |
72 | 73 | ||
74 | { ACTION_WPS_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT }, | ||
73 | { ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, | 75 | { ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, |
74 | { ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT }, | 76 | { ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT }, |
75 | 77 | ||
@@ -78,8 +80,10 @@ static const struct button_mapping button_context_wps[] = { | |||
78 | { ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT }, | 80 | { ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT }, |
79 | { ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT }, | 81 | { ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT }, |
80 | 82 | ||
83 | { ACTION_WPS_BROWSE, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER }, | ||
81 | { ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, | 84 | { ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, |
82 | { ACTION_WPS_QUICKSCREEN, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_TOPRIGHT }, | 85 | { ACTION_WPS_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT }, |
86 | |||
83 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS) | 87 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS) |
84 | }; /* button_context_wps */ | 88 | }; /* button_context_wps */ |
85 | 89 | ||
@@ -103,6 +107,8 @@ static const struct button_mapping button_context_list[] = { | |||
103 | }; /* button_context_list */ | 107 | }; /* button_context_list */ |
104 | 108 | ||
105 | static const struct button_mapping button_context_tree[] = { | 109 | static const struct button_mapping button_context_tree[] = { |
110 | { ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT }, | ||
111 | |||
106 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE) | 112 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE) |
107 | }; /* button_context_tree */ | 113 | }; /* button_context_tree */ |
108 | 114 | ||
@@ -136,15 +142,17 @@ static const struct button_mapping button_context_settings_right_is_inc[] = { | |||
136 | { ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, | 142 | { ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, |
137 | { ACTION_STD_OK, BUTTON_CENTER, BUTTON_NONE }, | 143 | { ACTION_STD_OK, BUTTON_CENTER, BUTTON_NONE }, |
138 | { ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE }, | 144 | { ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE }, |
145 | |||
139 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS) | 146 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS) |
140 | }; /* button_context_settingsgraphical */ | 147 | }; /* button_context_settingsgraphical */ |
141 | 148 | ||
142 | static const struct button_mapping button_context_yesno[] = { | 149 | static const struct button_mapping button_context_yesno[] = { |
143 | { ACTION_YESNO_ACCEPT, BUTTON_MIDLEFT, BUTTON_NONE }, | 150 | { ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE }, |
144 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_YESNOSCREEN) | 151 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_YESNOSCREEN) |
145 | }; /* button_context_settings_yesno */ | 152 | }; /* button_context_settings_yesno */ |
146 | 153 | ||
147 | static const struct button_mapping button_context_colorchooser[] = { | 154 | static const struct button_mapping button_context_colorchooser[] = { |
155 | { ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE }, | ||
148 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_SETTINGS_COLOURCHOOSER), | 156 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_SETTINGS_COLOURCHOOSER), |
149 | }; /* button_context_colorchooser */ | 157 | }; /* button_context_colorchooser */ |
150 | 158 | ||
@@ -193,6 +201,24 @@ static const struct button_mapping button_context_pitchscreen[] = { | |||
193 | 201 | ||
194 | static const struct button_mapping button_context_keyboard[] = { | 202 | static const struct button_mapping button_context_keyboard[] = { |
195 | 203 | ||
204 | { ACTION_KBD_LEFT, BUTTON_MIDLEFT, BUTTON_NONE }, | ||
205 | { ACTION_KBD_LEFT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
206 | { ACTION_KBD_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE }, | ||
207 | { ACTION_KBD_RIGHT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
208 | { ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT, BUTTON_NONE }, | ||
209 | { ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
210 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT, BUTTON_NONE }, | ||
211 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
212 | { ACTION_KBD_SELECT, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE }, | ||
213 | { ACTION_KBD_DONE, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, | ||
214 | { ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE }, | ||
215 | { ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT, BUTTON_NONE }, | ||
216 | { ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
217 | { ACTION_KBD_UP, BUTTON_TOPMIDDLE, BUTTON_NONE }, | ||
218 | { ACTION_KBD_UP, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE }, | ||
219 | { ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE }, | ||
220 | { ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE }, | ||
221 | |||
196 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_KEYBOARD) | 222 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_KEYBOARD) |
197 | }; /* button_context_keyboard */ | 223 | }; /* button_context_keyboard */ |
198 | 224 | ||
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 1de2c2f4d1..1addef2e44 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -193,6 +193,7 @@ static void setoptions (void) | |||
193 | options.START=BUTTON_REW; | 193 | options.START=BUTTON_REW; |
194 | options.SELECT=BUTTON_NONE; | 194 | options.SELECT=BUTTON_NONE; |
195 | options.MENU=BUTTON_POWER; | 195 | options.MENU=BUTTON_POWER; |
196 | |||
196 | #elif CONFIG_KEYPAD == MROBE500_PAD | 197 | #elif CONFIG_KEYPAD == MROBE500_PAD |
197 | options.UP=BUTTON_RC_PLAY; | 198 | options.UP=BUTTON_RC_PLAY; |
198 | options.DOWN=BUTTON_RC_DOWN; | 199 | options.DOWN=BUTTON_RC_DOWN; |
@@ -204,7 +205,11 @@ static void setoptions (void) | |||
204 | options.START=BUTTON_RC_HEART; | 205 | options.START=BUTTON_RC_HEART; |
205 | options.SELECT=BUTTON_RC_MODE; | 206 | options.SELECT=BUTTON_RC_MODE; |
206 | options.MENU=BUTTON_POWER; | 207 | options.MENU=BUTTON_POWER; |
208 | |||
207 | #elif CONFIG_KEYPAD == COWOND2_PAD | 209 | #elif CONFIG_KEYPAD == COWOND2_PAD |
210 | options.A=BUTTON_PLUS; | ||
211 | options.B=BUTTON_MINUS; | ||
212 | options.MENU=BUTTON_MENU; | ||
208 | 213 | ||
209 | #elif CONFIG_KEYPAD == GIGABEAT_S_PAD | 214 | #elif CONFIG_KEYPAD == GIGABEAT_S_PAD |
210 | options.UP=BUTTON_UP; | 215 | options.UP=BUTTON_UP; |
@@ -222,13 +227,14 @@ static void setoptions (void) | |||
222 | #ifdef HAVE_TOUCHSCREEN | 227 | #ifdef HAVE_TOUCHSCREEN |
223 | options.UP=BUTTON_TOPMIDDLE; | 228 | options.UP=BUTTON_TOPMIDDLE; |
224 | options.DOWN=BUTTON_BOTTOMMIDDLE; | 229 | options.DOWN=BUTTON_BOTTOMMIDDLE; |
225 | |||
226 | options.A=BUTTON_MIDLEFT; | ||
227 | options.B=BUTTON_MIDRIGHT; | ||
228 | options.START=BUTTON_TOPRIGHT; | 230 | options.START=BUTTON_TOPRIGHT; |
229 | options.SELECT=BUTTON_CENTER; | 231 | options.SELECT=BUTTON_CENTER; |
232 | #if CONFIG_KEYPAD != COWOND2_PAD | ||
233 | options.A=BUTTON_BOTTOMLEFT; | ||
234 | options.B=BUTTON_BOTTOMRIGHT; | ||
230 | options.MENU=BUTTON_TOPLEFT; | 235 | options.MENU=BUTTON_TOPLEFT; |
231 | #endif | 236 | #endif |
237 | #endif | ||
232 | 238 | ||
233 | options.maxskip=4; | 239 | options.maxskip=4; |
234 | options.fps=0; | 240 | options.fps=0; |