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/keymaps | |
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/keymaps')
-rw-r--r-- | apps/keymaps/keymap-fiiom3k.c | 19 |
1 files changed, 19 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; |