diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-16 16:44:01 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-22 12:20:44 +0000 |
commit | 5cbeb88541ebbfe388b3d60a1c7564b556b9748b (patch) | |
tree | 9ef43acdc857fa3b9be01bf35a45ab2b2ac19b3f /apps | |
parent | a2bac25a6355d1ac59df34717a28c3c03728c885 (diff) | |
download | rockbox-5cbeb88541ebbfe388b3d60a1c7564b556b9748b.tar.gz rockbox-5cbeb88541ebbfe388b3d60a1c7564b556b9748b.zip |
FiiO M3K: keymap improvements & fixes
- Add support for skip and seek while the player is locked.
(Thanks to @bahus for the suggestion)
- Fix touch zones because the down button zone ended up being
a lot smaller than expected due to the touchpad's wonkiness.
Also added a visual display of the touchpad to its debug menu.
- Fixes the pictureflow keymap because it was mostly unusable.
Change-Id: Ic0da4f8df3613ff7828ce1cb940ed9e77ada3281
Diffstat (limited to 'apps')
-rw-r--r-- | apps/keymaps/keymap-fiiom3k.c | 19 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 9 |
2 files changed, 28 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-fiiom3k.c b/apps/keymaps/keymap-fiiom3k.c index 440f851650..94d2dbc172 100644 --- a/apps/keymaps/keymap-fiiom3k.c +++ b/apps/keymaps/keymap-fiiom3k.c | |||
@@ -76,6 +76,16 @@ static const struct button_mapping button_context_wps[] = { | |||
76 | LAST_ITEM_IN_LIST | 76 | LAST_ITEM_IN_LIST |
77 | }; /* button_context_wps */ | 77 | }; /* button_context_wps */ |
78 | 78 | ||
79 | static const struct button_mapping button_context_wps_locked[] = { | ||
80 | {ACTION_WPS_SKIPNEXT, BUTTON_VOL_UP|BUTTON_REL, BUTTON_PLAY|BUTTON_VOL_UP}, | ||
81 | {ACTION_WPS_SEEKFWD, BUTTON_PLAY|BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE}, | ||
82 | {ACTION_WPS_STOPSEEK, BUTTON_PLAY|BUTTON_VOL_UP|BUTTON_REL, BUTTON_PLAY|BUTTON_VOL_UP|BUTTON_REPEAT}, | ||
83 | {ACTION_WPS_SKIPPREV, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_PLAY|BUTTON_VOL_DOWN}, | ||
84 | {ACTION_WPS_SEEKBACK, BUTTON_PLAY|BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE}, | ||
85 | {ACTION_WPS_STOPSEEK, BUTTON_PLAY|BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_PLAY|BUTTON_VOL_DOWN|BUTTON_REPEAT}, | ||
86 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_WPS) | ||
87 | }; /* button_context_wps_locked */ | ||
88 | |||
79 | static const struct button_mapping button_context_tree[] = { | 89 | static const struct button_mapping button_context_tree[] = { |
80 | {ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY}, | 90 | {ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY}, |
81 | {ACTION_TREE_WPS, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK}, | 91 | {ACTION_TREE_WPS, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK}, |
@@ -244,6 +254,15 @@ const struct button_mapping* get_context_mapping(int context) | |||
244 | { | 254 | { |
245 | switch (context) | 255 | switch (context) |
246 | { | 256 | { |
257 | case CONTEXT_WPS|CONTEXT_LOCKED: | ||
258 | return button_context_wps_locked; | ||
259 | default: | ||
260 | context &= ~CONTEXT_LOCKED; | ||
261 | break; | ||
262 | } | ||
263 | |||
264 | switch (context) | ||
265 | { | ||
247 | default: | 266 | default: |
248 | case CONTEXT_STD: | 267 | case CONTEXT_STD: |
249 | return button_context_standard; | 268 | return button_context_standard; |
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 9faf53661e..9731d92d35 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -148,6 +148,15 @@ const struct button_mapping pf_context_buttons[] = | |||
148 | {PF_CONTEXT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_FFWD}, | 148 | {PF_CONTEXT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_FFWD}, |
149 | {PF_TRACKLIST, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD}, | 149 | {PF_TRACKLIST, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD}, |
150 | {PF_WPS, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY}, | 150 | {PF_WPS, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY}, |
151 | #elif CONFIG_KEYPAD == FIIO_M3K_PAD | ||
152 | {PF_PREV, BUTTON_LEFT, BUTTON_NONE}, | ||
153 | {PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, | ||
154 | {PF_NEXT, BUTTON_RIGHT, BUTTON_NONE}, | ||
155 | {PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, | ||
156 | {PF_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER}, | ||
157 | {PF_QUIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER}, | ||
158 | {PF_CONTEXT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU}, | ||
159 | {PF_TRACKLIST, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU}, | ||
151 | #endif | 160 | #endif |
152 | #if CONFIG_KEYPAD == IAUDIO_M3_PAD | 161 | #if CONFIG_KEYPAD == IAUDIO_M3_PAD |
153 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE) | 162 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE) |