Support and General Use > Plugins/Viewers

Keyremap plugin - remaps keys in rockbox

<< < (2/5) > >>

You don't need to define a whole keymap just a few actions that you want and if they aren't matched it falls through to the regular keymaps

keyremap contexts must match exactly -- re-mapped contexts run before the built in w/ fall through contexts
 ie. you can't remap CONTEXT_STD and expect it to match CONTEXT_WPS after if falls through to CONTEXT_STD
(keyremap only checks for matches in the (first) top level context)

The same caveats do apply as when you are doing a 'real' keymap though namely fallthrough contexts may eat your button before you get a match
* Example: button = UP|REL, last_button = UP;
*  while looking in CONTEXT_WPS there is an action defined
*  then ACTION_FOO in CONTEXT_WPS will be returned
*  EVEN THOUGH you are expecting a fully matched

PS. You can also block actions by using ACTION_NONE BTN PBTN

Another cool feature! Thanks Bilgus!

I'm trying to block annoying pitch screen action on long press Play button in WPS on my Sansa Clip Zip (tested on build ee87bfb933)

So I'm adding CONTEXT_WPS re-maping entry, next adding 2 keys to Button column: BUTTON_MULTIMEDIA_PLAYPAUSE and BUTTON_REPEAT

So my re-maping looks like (Button looks a bit strange):
Context: WPS
Action: NONE
PreBtn: NONE

Next I click Temp Core Remap and test my changes. Pitch screen still appears on long Play press in WPS :(

What am I doing wrong?
Button column representation looks suspicios to me. Why HOME and BUTTON_MULTIMEDIA  is there? I didn't add it...

if you look at the list of buttons it the source


it just returns the constituent buttons

BUT that won't work to block pitchscreen

instead try:


--- Quote from: Bilgus on March 05, 2022, 07:56:58 AM ---instead try:

--- End quote ---

Works!! Thanks.

Some notes:
1) What about removing `BUTTON_` prefix in list of buttons and from cell? It seems already skipped in cell but only for first button. My remapping looks like: UP | BUTTON_REPEAT

2) Can list of keymaps in Load Keymaps be sorted by name? My current list looks like: [user_keyremap]1.kmf, 2.kmf, 6.kmf, 3.kmf, 4.kmf, 5.kmf.
Not sure why last keymap user_keyremap6.kmf in the middle of list...

3) Would be cool to support action that runs any particular plugin.

Plugins I'd like to do but I think I need a button level redirect to do it because they can use custom keymaps that will be really hard to figure out
without combing through source..

the other stuff, no sorry its more code than its worth and greatly complicates the buffer situation


[0] Message Index

[#] Next page

[*] Previous page

Go to full version