Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  mapping unmapped keys/wheels?
« previous next »
  • Print
Pages: [1]

Author Topic: mapping unmapped keys/wheels?  (Read 825 times)

Offline bubuz0

  • Member
  • *
  • Posts: 17
mapping unmapped keys/wheels?
« on: November 07, 2024, 07:48:36 PM »
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
Logged

Offline __builtin

  • Developer
  • Member
  • *
  • Posts: 409
  • iPod 6G, c200v1 (RIP), e200v1 (RIP)
    • FWEI.TK
Re: mapping unmapped keys/wheels?
« Reply #1 on: November 08, 2024, 12:11:30 AM »
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!
Logged
No support questions by PM, please.

Offline bubuz0

  • Member
  • *
  • Posts: 17
Re: mapping unmapped keys/wheels?
« Reply #2 on: November 08, 2024, 09:38:21 PM »
Thank you! Very useful pointers!

(pun intended!  ;))
Logged

Offline bubuz0

  • Member
  • *
  • Posts: 17
Re: mapping unmapped keys/wheels?
« Reply #3 on: November 30, 2024, 10:26:55 AM »
..
« Last Edit: November 30, 2024, 10:30:30 AM by bubuz0 »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  mapping unmapped keys/wheels?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.05 seconds with 15 queries.