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
Search



Donate

Rockbox Technical Forums


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

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Remap buttons?
« previous next »
  • Print
Pages: [1] 2

Author Topic: Remap buttons?  (Read 15748 times)

Offline GGGGGG

  • Member
  • *
  • Posts: 24
Remap buttons?
« on: November 30, 2010, 02:46:27 PM »
Is there any easy way to do this?

The reason I'm asking is because my old Sansa e280's scroll wheel broke, so now I can only select songs in the OF anymore, because Rockbox uses the wheel for everything. I left the player alone for a long time and got myself a Fuze instead, but recently I thought I might be able to remap the buttons so that I can select files in Rockbox by using the Play and the Menu key as up and down keys respectively, and in the WPS, use them as VolumeUp and VolumeDown. (Yeah, I know some other keys would have to be remapped as well, but I'm still thinking of the best way to do that.) I wouldn't need the keys in any other section though, as I'd only still use the e280 to listen to music.

So, is it possible, and if so, what do I need to do? Or is there perhaps a custom build that already has the keys mapped in a way similar to this?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Re: Remap buttons?
« Reply #1 on: November 30, 2010, 03:04:44 PM »
Grab the source and edit apps/keymaps/keymap-e200.c, then compile a modified build.

The BUTTON_SCROLL_FWD and BUTTON_SCROLL_BACK instances will probably be need to changed to BUTTON_UP, BUTTON_DOWN, etc.  Though I expect you'll need to experiment to figure out combinations that work well for different screens.
Logged

Offline GGGGGG

  • Member
  • *
  • Posts: 24
Re: Remap buttons?
« Reply #2 on: November 30, 2010, 03:50:42 PM »
Alright, thank you very much, but how would I go to 'compile' a build?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Re: Remap buttons?
« Reply #3 on: November 30, 2010, 03:57:17 PM »
http://www.rockbox.org/wiki/DevelopmentGuide
Logged

Offline GGGGGG

  • Member
  • *
  • Posts: 24
Re: Remap buttons?
« Reply #4 on: December 01, 2010, 03:48:07 AM »
Great! Thanks! :D
Logged

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Re: Remap buttons?
« Reply #5 on: December 10, 2010, 10:17:34 PM »
Is it possible to do simpler mappings without modifying code?

For instance, my Sansa Fuze has no dedicated volume button, so volume adjustment is only accessible on the WPS or in settings.  I'd like a simple, sure fire way to quickly get to the WPS so that I can quickly adjust the volume.

What would be ideal would be to have the 'Home' button always pull up the main menu no matter where you are (never unmapped), except that when in the main menu I'd like to have it pull up the WPS.  That way the WPS is never more than two button presses away.  Is that doable?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Re: Remap buttons?
« Reply #6 on: December 10, 2010, 10:20:12 PM »
Aside from the hotkey option, you have to edit code to change buttons.
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Remap buttons?
« Reply #7 on: December 10, 2010, 10:51:35 PM »
Carson Dyle,

You could assign Volume Up and Volume Down to either Left/Right or Up/Down quickscreen slots.

That way, you have a way to quickly access the volume from almost anywhere.



[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline emreka

  • Member
  • *
  • Posts: 6
Re: Remap buttons?
« Reply #8 on: February 26, 2011, 06:00:16 PM »
I'm having the exact same problem with my Sansa e280v2, and I must admit I cannot pull the "edit source/compile" option. But I still want to keep using my Sansa, I treat it terribly but it's solid like a rock and never failed me for over 3 years, I broke a philips in less than a week just recently.

Quote from: [St.] on December 10, 2010, 10:51:35 PM
Carson Dyle,

You could assign Volume Up and Volume Down to either Left/Right or Up/Down quickscreen slots.

That way, you have a way to quickly access the volume from almost anywhere.


[St.]

Can I assume that you could assign hotkeys offline? If so, how would I do it? Could I make it a combination of two buttons? It would save me a great deal of trouble.

Overlord Nadrian, if I may ask, did you go ahead and compile a custom build? If you did, would you be so kind to share it with me?
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Remap buttons?
« Reply #9 on: February 26, 2011, 06:46:50 PM »
I'm not sure you're fully understanding my post...

Quote from: [St.] on December 10, 2010, 10:51:35 PM
You could assign Volume Up and Volume Down to either Left/Right or Up/Down quickscreen slots.

That way, you have a way to quickly access the volume from almost anywhere.

You don't have to compile a new build at all to achieve this, the manual will tell you all you need to know about the quickscreen and assigning objects to it.



[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline emreka

  • Member
  • *
  • Posts: 6
Re: Remap buttons?
« Reply #10 on: February 26, 2011, 07:28:00 PM »
My bad, I totally forgot about quickscreen and wasn't paying attention to the question you were referring to in your previous post. The quick screen suggestion doesnt apply to me anyway, as I am stuck without a scroll wheel to to perform any tasks on player. Even if I was able to assign volume controls to the quickscreen, it wouldn't be much of a help. What I need is to assign the functions of the wheel to two other buttons or button combinations, which seems beyond my skills. Thanks for the help anyway.

edit: I'm actually experimenting with the keymap-e200.c, thanks to "The Simple Guide To Compiling In Linux" it's quite easy to compile a build. What I'm trying to do is kill record function and replace "BUTTON_SCROLL_FWD&BACK" with "BUTTON_REC|BUTTON_DOWN&UP".
My question is, how would I kill all other functions of the Record button? Replacing it with the broken button in the keymap-e200.c doesn't seem to work. What else do I need to do?
Thanks in advance.
« Last Edit: February 28, 2011, 09:05:47 AM by emreka »
Logged

Offline emreka

  • Member
  • *
  • Posts: 6
Re: Remap buttons?
« Reply #11 on: March 02, 2011, 01:37:49 PM »
Sorry for stealing the thread,Overlord Nadrian. I will try to keep this as short as possible.
OK, I now realize "replacing all" was a stupid idea. I'm looking into the keymap and trying to solve conflicts, it doesn't seem so hard. I gave up some functions such as quickscreen, pitchscreen, scanning through songs, etc. I sorted out some tasks assigned to two buttons like "BUTTON_SELECT" and "BUTTON_RIGHT".  Releasing BUTTON_RIGHT&LEFT from default mapping, I assigned them to ACTION_WPS_VOLUP&DOWN in the WPS like this: BUTTON_RIGHT|BUTTON_REPEAT (which was formerly assign to scanning through songs) so now I can adjust the volume. The player is operational, with the ##Music# being on top and "Power button+right&left" combo, I can open files and switch through albums(folders). However I would like to access the database. Main problem is I can't browse "up & down" in any of the list views. I am stuck on the top. I can't see an option in the keymap either. Where am I doing wrong? What action code or option defines up&down in list views and main menu? Is it independent of the mappings? If you guys take the time to answer please keep in mind that I am not a power user or a native English speaker. Thanks.
Logged

Offline posfan12

  • Member
  • *
  • Posts: 3
Re: Remap buttons?
« Reply #12 on: April 16, 2011, 04:04:18 PM »
Would it be possible to remap the power-on button? Unfortunately the little switch inside the unit broke and I don't have a replacement. (Maybe Frys has one? It is *tiny*!!)
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Re: Remap buttons?
« Reply #13 on: April 16, 2011, 04:09:21 PM »
Quote from: posfan12 on April 16, 2011, 04:04:18 PM
Would it be possible to remap the power-on button? Unfortunately the little switch inside the unit broke and I don't have a replacement. (Maybe Frys has one? It is *tiny*!!)

You could remap it inside rockbox, but you'd still need to use it for anything else other then rockbox (like turning on the player).
Logged

Offline emreka

  • Member
  • *
  • Posts: 6
Re: Remap buttons?
« Reply #14 on: April 16, 2011, 04:27:11 PM »
posfan12, if the power button is broken i think the only way to turn on the player is to connect it to PC. If you turn off auto-shut down you may not even need it. As for remapping buttons, it's not that hard. I'm attaching the original keymap for e200 (open it with any text editor other than notepad, it makes a mess), you might want to take a look, I can share a few tips if you decide to compile your own build.

That being said, I'd like to repeat my question. I pretty much sorted out everything except up and down function in any of the menus(my scroll wheel is broken). Are there action codes for that? I looked through the keymap but cannot find anything useful for me. What I want to do is replace the default tasks assigned UP and DOWN buttons and with those of scroll wheel.
* keymap-e200-original.c (25.52 kB - downloaded 329 times.)
« Last Edit: April 16, 2011, 04:29:54 PM by emreka »
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Remap buttons?
 

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

Page created in 0.506 seconds with 23 queries.