Support and General Use > Plugins/Viewers

mapping unmapped keys/wheels?

(1/1)

bubuz0:
Let's imagine that somebody has an audio player (a Surfans F20) that would have some plugins (doom, pacman) that wouldn't have all its buttons (and especially not the rather gorgeous wheel!) mapped properly...

What would that person have to do in order to:
1/ learn how to map keys to actions in the plugins?
2/ learn how to describe the wheel movements as keys?

Maybe it's not as simple as this?

Thanks, on behalf of that "somebody"  :D

__builtin:
Rockbox and most of its plugins are written in C, so you'll need to get familiar with that. Then you'll want to get up to speed on how to modify and build Rockbox. See here: https://www.rockbox.org/wiki/DevelopmentGuide.

Plugin button input is all rather plugin-dependent, so you'll want to read the source code for the plugin you're interested in. There are some common cross-plugin APIs that exist for handling input, such as pluginlib_actions or keymaps.h, but more complex plugins usually handle their input as raw button scancodes.

Usually I will grep through the source code looking for instances of "button" to get oriented, and then go from there. For example, doom's button mapping for the Eros is here: https://git.rockbox.org/cgit/rockbox.git/tree/apps/plugins/doom/i_video.c#n596

Scroll wheel movement is similarly ad-hoc, though Rockbox does synthesize scroll wheel movements as "button" events. See here for how doom does it: https://git.rockbox.org/cgit/rockbox.git/tree/apps/plugins/doom/i_video.c#n658

Happy hacking!

bubuz0:
Thank you! Very useful pointers!

(pun intended!  ;))

bubuz0:
..

Navigation

[0] Message Index

Go to full version