Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,768,721 Members 52,530 Now Online
XDA Developers Android and Mobile Development Forum

[TWEAK]Walkman Key in LIVE

Tip us?
 
kenny313
Old
(Last edited by kenny313; 8th March 2012 at 12:07 AM.)
#1  
Junior Member - OP
Thanks Meter 44
Posts: 12
Join Date: Sep 2010
Default [TWEAK]Walkman Key in LIVE

This is a little example for how to use walkman key as search key so with this u can use any app u want with that kay by just using an app that changes search key behavior

1.Using any file explorer with root go to /system/usr/keylayout/
2. Edit with texteditor file: pm8058-keypad.kl

It should look like this:

Code:
# this corresponds to kernel/arch/arm/mach-msm/keypad-coconut.c
#
# defines for values are in frameworks/base/include/ui/KeycodeLabels.h

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE

# KEY_HOME
key 102   HOME              WAKE_DROPPED

# CAMERA Related Key
key 212   CAMERA
key 528   FOCUS

# WALKMAN key
key 200   VENDOR_1
At the bottom of the file u can see:

Code:
# WALKMAN key
key 200   VENDOR_1
VENDOR_1 is used to tell android which action the key will take
so if we change VENDOR_1 to SEARCH wolkman key will be recognized as a SEARCH key.

So the file after changing it should look like this:


Code:
# this corresponds to kernel/arch/arm/mach-msm/keypad-coconut.c
#
# defines for values are in frameworks/base/include/ui/KeycodeLabels.h

key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE

# KEY_HOME
key 102   HOME              WAKE_DROPPED

# CAMERA Related Key
key 212   CAMERA
key 528   FOCUS

# WALKMAN key
key 200   SEARCH
After editing the file save it and reboot device.

U can map any action to this kay that android will recognize for the rest of actions availdable u can use qwerty.kl as refrance:

Code:
key 399   GRAVE
key 2     1
key 3     2
key 4     3
key 5     4
key 6     5
key 7     6
key 8     7
key 9     8
key 10    9
key 11    0
key 158   BACK              WAKE_DROPPED
key 230   SOFT_RIGHT        WAKE
key 60    SOFT_RIGHT        WAKE
key 107   ENDCALL           WAKE_DROPPED
key 62    ENDCALL           WAKE_DROPPED
key 229   MENU              WAKE_DROPPED
key 139   MENU              WAKE_DROPPED
key 59    MENU              WAKE_DROPPED
key 127   SEARCH            WAKE_DROPPED
key 217   SEARCH            WAKE_DROPPED
key 228   POUND
key 227   STAR
key 231   CALL              WAKE_DROPPED
key 61    CALL              WAKE_DROPPED
key 232   DPAD_CENTER       WAKE_DROPPED
key 108   DPAD_DOWN         WAKE_DROPPED
key 103   DPAD_UP           WAKE_DROPPED
key 102   HOME              WAKE
key 105   DPAD_LEFT         WAKE_DROPPED
key 106   DPAD_RIGHT        WAKE_DROPPED
key 115   VOLUME_UP         WAKE
key 114   VOLUME_DOWN       WAKE
key 116   POWER             WAKE
key 212   CAMERA

key 16    Q
key 17    W
key 18    E
key 19    R
key 20    T
key 21    Y
key 22    U
key 23    I
key 24    O
key 25    P
key 26    LEFT_BRACKET
key 27    RIGHT_BRACKET
key 43    BACKSLASH

key 30    A
key 31    S
key 32    D
key 33    F
key 34    G
key 35    H
key 36    J
key 37    K
key 38    L
key 39    SEMICOLON
key 40    APOSTROPHE
key 14    DEL
        
key 44    Z
key 45    X
key 46    C
key 47    V
key 48    B
key 49    N
key 50    M
key 51    COMMA
key 52    PERIOD
key 53    SLASH
key 28    ENTER
        
key 56    ALT_LEFT
key 100   ALT_RIGHT
key 42    SHIFT_LEFT
key 54    SHIFT_RIGHT
key 15    TAB
key 57    SPACE
key 150   EXPLORER
key 155   ENVELOPE        

key 12    MINUS
key 13    EQUALS
key 215   AT

# On an AT keyboard: ESC, F10
key 1     BACK              WAKE_DROPPED
key 68    MENU              WAKE_DROPPED
And the most useful with Walkman:

Code:
key 200   MEDIA_PLAY_PAUSE    WAKE
key 201   MEDIA_PLAY_PAUSE    WAKE
key 166   MEDIA_STOP          WAKE
key 163   MEDIA_NEXT          WAKE
key 165   MEDIA_PREVIOUS      WAKE
key 168   MEDIA_REWIND        WAKE
key 208   MEDIA_FAST_FORWARD  WAKE
When changing action taken by walkman key to one of the above like MEDIA_PLAY_PAUSE its advised to add this WAKE too if u want to use this button when phone is sleeping

So it should look like this:

Code:
# WALKMAN key
key 200 MEDIA_PLAY_PAUSE WAKE
Hope this helps
The Following 39 Users Say Thank You to kenny313 For This Useful Post: [ Click to Expand ]
 
trantiena10
Old
#2  
Senior Member
Thanks Meter 86
Posts: 262
Join Date: Jan 2010
wow ...
its great .... tks tks
 
ramezzidane
Old
#3  
Senior Member
Thanks Meter 321
Posts: 408
Join Date: Nov 2011
Location: Damascus
very good work

thanks
The Following User Says Thank You to ramezzidane For This Useful Post: [ Click to Expand ]
 
alex932109
Old
#4  
Member
Thanks Meter 4
Posts: 32
Join Date: Jul 2011
Location: Belarus
Default /

# WALKMAN key
key 200 HEADSETHOOK WAKE

to end call, BEGIN CALL and music control (the button will work like buttun on headset)
The Following 2 Users Say Thank You to alex932109 For This Useful Post: [ Click to Expand ]
 
androidsl
Old
#5  
Senior Member
Thanks Meter 16
Posts: 105
Join Date: Dec 2010
Location: Gampaha
so if i want to launch poweramp application with this walkman button, how do i do that? will simply mention app name work?

key 200 POWERAMP
Sony Ericsson live with walkman
 
kenny313
Old
#6  
Junior Member - OP
Thanks Meter 44
Posts: 12
Join Date: Sep 2010
If u want to assign poweramp app to Walkman key the only option for now is to assign it as search key and then with app for example: LaunchKey assign an app to long press search key.
The Following User Says Thank You to kenny313 For This Useful Post: [ Click to Expand ]
 
gandhar
Old
(Last edited by gandhar; 10th March 2012 at 05:34 AM.)
#7  
gandhar's Avatar
Senior Member
Thanks Meter 677
Posts: 1,028
Join Date: Jan 2012
Location: Goa
Quote:
Originally Posted by kenny313 View Post
If u want to assign poweramp app to Walkman key the only option for now is to assign it as search key and then with app for example: LaunchKey assign an app to long press search key.
can you give an example?
i want to assign double twist player to walkman key

this is awesome, the walkman key finally works on cm7
 
fanaticprakash
Old
#8  
fanaticprakash's Avatar
Senior Member
Thanks Meter 47
Posts: 345
Join Date: Jan 2012
Location: Coimbatore
In CM7.2 Walkman button is not working, is there any way to fix it??

Sent from my WT19i using XDA
Helping others makes us Happier
 
gandhar
Old
#9  
gandhar's Avatar
Senior Member
Thanks Meter 677
Posts: 1,028
Join Date: Jan 2012
Location: Goa
in cm7 use the above method to allocate search to walkman key and then go to settings, cm settings, input, search key behavior and choose whatever app you want for the long press action, for the short press whenever a search is possible, that will turn up instead of the app.
 
badawy85
Old
#10  
Junior Member
Thanks Meter 0
Posts: 13
Join Date: Oct 2008
Quote:
Originally Posted by kenny313 View Post
If u want to assign poweramp app to Walkman key the only option for now is to assign it as search key and then with app for example: LaunchKey assign an app to long press search key.
Good work man but i would like to assign the key to poweramp too how to do that? i am on hyprom v15 and tried to do search example to assign poweramp but it dosent work for me

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes