Post Reply

[TWEAK]Walkman Key in LIVE

7th March 2012, 11:33 PM   |  #1  
OP Junior Member
Thanks Meter: 44
 
12 posts
Join Date:Joined: Sep 2010
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
Last edited by kenny313; 8th March 2012 at 12:07 AM.
The Following 39 Users Say Thank You to kenny313 For This Useful Post: [ View ]
8th March 2012, 02:20 AM   |  #2  
Senior Member
Thanks Meter: 86
 
262 posts
Join Date:Joined: Jan 2010
More
wow ...
its great .... tks tks
8th March 2012, 03:06 AM   |  #3  
Senior Member
Flag Damascus
Thanks Meter: 321
 
408 posts
Join Date:Joined: Nov 2011
More
very good work

thanks
The Following User Says Thank You to ramezzidane For This Useful Post: [ View ]
8th March 2012, 05:10 AM   |  #4  
Member
Belarus
Thanks Meter: 4
 
32 posts
Join Date:Joined: Jul 2011
More
/
# 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: [ View ]
8th March 2012, 05:35 AM   |  #5  
Senior Member
Flag Gampaha
Thanks Meter: 16
 
105 posts
Join Date:Joined: Dec 2010
More
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
8th March 2012, 09:45 AM   |  #6  
OP Junior Member
Thanks Meter: 44
 
12 posts
Join Date:Joined: 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: [ View ]
10th March 2012, 05:15 AM   |  #7  
gandhar's Avatar
Senior Member
Flag Goa
Thanks Meter: 677
 
1,028 posts
Join Date:Joined: Jan 2012
More
Quote:
Originally Posted by kenny313

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
Last edited by gandhar; 10th March 2012 at 05:34 AM.
10th March 2012, 06:50 AM   |  #8  
fanaticprakash's Avatar
Senior Member
Flag Coimbatore
Thanks Meter: 47
 
345 posts
Join Date:Joined: Jan 2012
More
In CM7.2 Walkman button is not working, is there any way to fix it??

Sent from my WT19i using XDA
20th March 2012, 02:58 AM   |  #9  
gandhar's Avatar
Senior Member
Flag Goa
Thanks Meter: 677
 
1,028 posts
Join Date:Joined: Jan 2012
More
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.
20th March 2012, 08:08 AM   |  #10  
Junior Member
Thanks Meter: 0
 
13 posts
Join Date:Joined: Oct 2008
Quote:
Originally Posted by kenny313

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

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xperia Mini, Mini Pro, Active, Live with Walkman Android Development by ThreadRank