diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2019-08-03 18:01:24 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2019-08-04 00:41:30 +0200 |
commit | a18803af27f5a34fb45d7938c7f1b159f8066e34 (patch) | |
tree | 8d731975b9e911c502bb661575d1a38ee1670d23 | |
parent | 51d47c53f7541f66db866709a58ece44475ff332 (diff) | |
download | rockbox-a18803af27f5a34fb45d7938c7f1b159f8066e34.tar.gz rockbox-a18803af27f5a34fb45d7938c7f1b159f8066e34.zip |
Creative Zen keymap fixes:
- Assigned hotkey to long back
- Assigned quickscreen invocation to long menu
- Fixed pitchscreen control
- Assigned long presses in pitchscreen
Patch by Igor Poretsky
Change-Id: I56ca8ea046ba564356f0a178a724182df88a3ac1
-rw-r--r-- | apps/keymaps/keymap-zen.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/apps/keymaps/keymap-zen.c b/apps/keymaps/keymap-zen.c index acc9f2649f..ab0f32edb4 100644 --- a/apps/keymaps/keymap-zen.c +++ b/apps/keymaps/keymap-zen.c | |||
@@ -66,11 +66,11 @@ static const struct button_mapping button_context_standard[] = { | |||
66 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 66 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
67 | { ACTION_STD_CONTEXT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, | 67 | { ACTION_STD_CONTEXT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, |
68 | #ifdef ZEN_HAS_CONTROL | 68 | #ifdef ZEN_HAS_CONTROL |
69 | { ACTION_STD_CONTEXT, BUTTON_MENU, BUTTON_NONE }, | 69 | { ACTION_STD_CONTEXT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, |
70 | #endif | 70 | #endif |
71 | { ACTION_STD_QUICKSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
71 | 72 | ||
72 | { ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE }, | 73 | { ACTION_STD_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, |
73 | { ACTION_STD_CANCEL, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE }, | ||
74 | { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, | 74 | { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, |
75 | { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 75 | { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
76 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | 76 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
@@ -85,7 +85,10 @@ static const struct button_mapping button_context_wps[] = { | |||
85 | 85 | ||
86 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE }, | 86 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE }, |
87 | #ifdef ZEN_HAS_CONTROL | 87 | #ifdef ZEN_HAS_CONTROL |
88 | { ACTION_WPS_CONTEXT, BUTTON_MENU, BUTTON_NONE }, | 88 | { ACTION_WPS_CONTEXT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, |
89 | #ifdef HAVE_HOTKEY | ||
90 | { ACTION_WPS_HOTKEY, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | ||
91 | #endif | ||
89 | #endif | 92 | #endif |
90 | 93 | ||
91 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | 94 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, |
@@ -109,7 +112,8 @@ static const struct button_mapping button_context_wps[] = { | |||
109 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | 112 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, |
110 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 113 | { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
111 | 114 | ||
112 | { ACTION_WPS_MENU, BUTTON_BACK, BUTTON_NONE }, | 115 | { ACTION_WPS_MENU, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, |
116 | { ACTION_WPS_QUICKSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
113 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | 117 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
114 | 118 | ||
115 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 119 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
@@ -145,9 +149,13 @@ static const struct button_mapping button_context_quickscreen[] = { | |||
145 | { ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE }, | 149 | { ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE }, |
146 | { ACTION_STD_CANCEL, BUTTON_PLAYPAUSE, BUTTON_NONE }, | 150 | { ACTION_STD_CANCEL, BUTTON_PLAYPAUSE, BUTTON_NONE }, |
147 | { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE }, | 151 | { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE }, |
152 | { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
148 | { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, | 153 | { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, |
154 | { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
149 | { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, | 155 | { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
156 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
150 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 157 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
158 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
151 | 159 | ||
152 | LAST_ITEM_IN_LIST | 160 | LAST_ITEM_IN_LIST |
153 | }; /* button_context_quickscreen */ | 161 | }; /* button_context_quickscreen */ |
@@ -156,6 +164,10 @@ static const struct button_mapping button_context_tree[] = { | |||
156 | { ACTION_TREE_WPS, BUTTON_PLAYPAUSE|BUTTON_REL, BUTTON_PLAYPAUSE }, | 164 | { ACTION_TREE_WPS, BUTTON_PLAYPAUSE|BUTTON_REL, BUTTON_PLAYPAUSE }, |
157 | { ACTION_TREE_STOP, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, | 165 | { ACTION_TREE_STOP, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, |
158 | 166 | ||
167 | #if defined(HAVE_HOTKEY) && defined(ZEN_HAS_CONTROL) | ||
168 | { ACTION_TREE_HOTKEY, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | ||
169 | #endif | ||
170 | |||
159 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) | 171 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) |
160 | }; /* button_context_tree */ | 172 | }; /* button_context_tree */ |
161 | 173 | ||
@@ -277,17 +289,23 @@ static const struct button_mapping button_context_pitchscreen[] = { | |||
277 | { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 289 | { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
278 | 290 | ||
279 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, | 291 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
280 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 292 | { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, |
281 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 293 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
282 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 294 | { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, |
283 | 295 | ||
296 | #ifdef ZEN_HAS_CONTROL | ||
284 | { ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE }, | 297 | { ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE }, |
298 | #else | ||
299 | { ACTION_PS_TOGGLE_MODE, BUTTON_PLAYPAUSE, BUTTON_NONE }, | ||
300 | #endif | ||
285 | 301 | ||
286 | { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE }, | 302 | { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE }, |
287 | { ACTION_PS_EXIT, BUTTON_BACK, BUTTON_NONE }, | 303 | { ACTION_PS_EXIT, BUTTON_BACK, BUTTON_NONE }, |
288 | { ACTION_PS_EXIT, BUTTON_PLAYPAUSE, BUTTON_NONE }, | ||
289 | 304 | ||
290 | LAST_ITEM_IN_LIST | 305 | { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
306 | { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
307 | |||
308 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
291 | }; /* button_context_pitchcreen */ | 309 | }; /* button_context_pitchcreen */ |
292 | 310 | ||
293 | static const struct button_mapping button_context_yesno[] = { | 311 | static const struct button_mapping button_context_yesno[] = { |