android
Prev Previous Post   Next Post Next
  #1  
Old 09-04-2010, 09:09 AM
Confuseling Confuseling is offline
Member
 
Join Date: May 2010
Posts: 227
Default Alternative keybindings attempt thread!

[Edit - This is a second attempt, which appears to play much better...]

I decided to embark on this mission, though it's proved harder than I thought - for example, you can't just switch on the keylock on the radio, some deeper digging must be necessary.

However, with a bit of rearrangement, I've added the hotkeys (short home), and what effectively amounts to an [almost] always functional 'start / stop' key you can use without having to look (long home). To do this, I've had to move the quickscreen to short down (you crazy kids who want to turn your backlight back on will just have to use short power...), but otherwise I think I've just squeezed out a bit of redundancy in ways to move around the menu. It's not a *great* deal of added functionality, sure, but I think I prefer it, and it's been interesting to play around with anyway.

To use, first you need to uncomment the last line of /firmware/export/config/sansaclipplus.h to turn on the hotkeys.

Then apply this diff to /apps/keymaps/keymap-clip.c

Code:
Index: keymap-clip.c
===================================================================
--- keymap-clip.c	(revision 27995)
+++ keymap-clip.c	(working copy)
@@ -39,9 +39,6 @@
     { ACTION_STD_NEXT,        BUTTON_DOWN,                      BUTTON_NONE },
     { ACTION_STD_NEXTREPEAT,  BUTTON_DOWN|BUTTON_REPEAT,        BUTTON_NONE },
 
-    { ACTION_STD_MENU,        BUTTON_HOME|BUTTON_REL,           BUTTON_HOME },
-    { ACTION_STD_QUICKSCREEN, BUTTON_HOME|BUTTON_REPEAT,        BUTTON_HOME },
-
     { ACTION_STD_OK,          BUTTON_SELECT|BUTTON_REL,         BUTTON_SELECT },
     { ACTION_STD_OK,          BUTTON_RIGHT,                     BUTTON_NONE },
     { ACTION_STD_CANCEL,      BUTTON_LEFT,                      BUTTON_NONE },
@@ -55,7 +52,7 @@
 
 static const struct button_mapping button_context_wps[]  = {
     { ACTION_WPS_PLAY,     BUTTON_UP|BUTTON_REL,        BUTTON_UP },
-    { ACTION_WPS_STOP,     BUTTON_POWER|BUTTON_REL,     BUTTON_POWER },
+    { ACTION_WPS_STOP,     BUTTON_HOME|BUTTON_REPEAT,     BUTTON_NONE },
 
     { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL,    BUTTON_LEFT },
     { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
@@ -77,18 +74,17 @@
     { ACTION_WPS_BROWSE,        BUTTON_SELECT|BUTTON_REL,     BUTTON_SELECT },
     { ACTION_WPS_CONTEXT,       BUTTON_SELECT|BUTTON_REPEAT,  BUTTON_SELECT },
 
-    { ACTION_WPS_QUICKSCREEN,   BUTTON_HOME|BUTTON_REPEAT,    BUTTON_HOME },
-    { ACTION_WPS_MENU,          BUTTON_HOME|BUTTON_REL,      BUTTON_HOME },
+    { ACTION_WPS_QUICKSCREEN,   BUTTON_DOWN|BUTTON_REL,      BUTTON_NONE },
 
     { ACTION_WPS_PITCHSCREEN,   BUTTON_UP|BUTTON_REPEAT,        BUTTON_NONE },
     { ACTION_WPS_ID3SCREEN,     BUTTON_SELECT|BUTTON_DOWN,      BUTTON_SELECT },
 
 #ifdef HAVE_HOTKEY /* down|repeat doesn't work in the file browser */
-    { ACTION_WPS_HOTKEY,        BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_NONE }, 
-#else
-    { ACTION_WPS_VIEW_PLAYLIST, BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_NONE }, 
+    { ACTION_WPS_HOTKEY,        BUTTON_HOME|BUTTON_REL,         BUTTON_HOME }, 
 #endif
 
+    { ACTION_WPS_VIEW_PLAYLIST, BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_NONE }, 
+
 #ifndef HAS_BUTTON_HOLD /* Clip+ */
     { ACTION_STD_KEYLOCK,       BUTTON_HOME|BUTTON_SELECT,      BUTTON_NONE },
 #endif /* HAS_BUTTON_HOLD */
@@ -134,10 +130,10 @@
 }; /* button_context_list */
 
 static const struct button_mapping button_context_tree[]  = {
-    { ACTION_TREE_WPS,    BUTTON_HOME|BUTTON_SELECT,    BUTTON_HOME },
+    { ACTION_TREE_WPS,    BUTTON_HOME|BUTTON_REPEAT,    BUTTON_NONE },
     { ACTION_TREE_STOP,   BUTTON_POWER|BUTTON_REL,      BUTTON_POWER },
 #ifdef HAVE_HOTKEY
-//    { ACTION_TREE_HOTKEY, BUTTON_NONE,                  BUTTON_NONE },
+    { ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REL,       BUTTON_NONE },
 #endif
 
     LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
If anyone is interested in trying this, let me know if you find anything that's missing or broken. Any bright ideas for improvements are most welcome too...

[removed old versions]

ETA fifty-third-time-lucky: I reckon the posted patch might actually now work!

Last edited by Confuseling; 09-05-2010 at 04:51 PM.
Reply With Quote

Advertisement [Remove Advertisement]

 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:36 AM.