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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Sansa Clip + Buttons Change
« previous next »
  • Print
Pages: [1]

Author Topic: Sansa Clip + Buttons Change  (Read 1748 times)

Offline Lizzard

  • Member
  • *
  • Posts: 2
Sansa Clip + Buttons Change
« on: July 13, 2010, 02:35:01 AM »
Hi, have a question
I wanna change function buttons in my Sansa Clip+, i think it's would be better for me "play/pause" button mapped on "Home" button.
In last release of Rockbox for Sansa Clip+ i find a file named "\.rockbox\rocks\viewers\lua\buttons.lua" with text:
 
-- Don't change this file!
-- It is automatically generated of button.h $Revision: 21630 $
rb.buttons = {
   BUTTON_UP = 8,
   BUTTON_VOL_DOWN = 4,
   BUTTON_SELECT = 128,
   BUTTON_REMOTE = 0,
   BUTTON_POWER = 256,
   BUTTON_DOWN = 16,
   BUTTON_LEFT = 32,
   BUTTON_RIGHT = 64,
   BUTTON_MAIN = 511,
   BUTTON_HOME = 1,
   BUTTON_VOL_UP = 2,
   BUTTON_REL = 33554432,
   BUTTON_REPEAT = 67108864,
   BUTTON_TOUCHSCREEN = 134217728,
}

Question: If i change port numbers in this file BUTTON_HOME = 1 to BUTTON_HOME = 8 and BUTTON_UP = 8 to BUTTON_UP = 1 it will work or not? And if i'm wrong what can i do to change buttons?
Thx a lot for answers..
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Sansa Clip + Buttons Change
« Reply #1 on: July 13, 2010, 03:32:58 AM »
Changing that file would only result in plugins written in lua changing their behaviour with regard to buttons - it wouldn't affect the rest of Rockbox's functionality.

If you want to change the buttons on your clip you will have to check out the Rockbox source code, edit that, and then compile your own build.
Logged

Read The Manual Please

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Sansa Clip + Buttons Change
« Reply #2 on: July 13, 2010, 04:39:06 AM »
The attached file will do what you need assuming you can do your own build.
* buttonchange.txt (0.67 kB - downloaded 130 times.)
Logged


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

Offline Lizzard

  • Member
  • *
  • Posts: 2
Re: Sansa Clip + Buttons Change
« Reply #3 on: July 13, 2010, 06:03:28 AM »
Wow, so fast, thx a LOT!!
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Sansa Clip + Buttons Change
« Reply #4 on: July 14, 2010, 12:20:40 PM »
Please try to use real words here rather than "text type".

Thanks.  :)
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Sansa Clip + Buttons Change
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.082 seconds with 15 queries.