[TWEAK]Walkman Key in LIVE

Search This thread

kenny313

Member
Sep 4, 2010
12
44
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:

androidsl

Senior Member
Dec 21, 2010
103
16
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
 

kenny313

Member
Sep 4, 2010
12
44
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.
 
  • Like
Reactions: meql

gandhar

Senior Member
Jan 20, 2012
1,037
679
Goa
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:

gandhar

Senior Member
Jan 20, 2012
1,037
679
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

Member
Oct 20, 2008
13
0
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
 

lokaltrafik

Member
Jan 14, 2011
20
3
Great!

Anyone know where VENDOR_1 is set? There should be the same line in another file pointing to the walkman apk. I would also like to change the button to launch Ubermusic.
 

Someguyfromhell

Senior Member
Feb 2, 2012
4,148
1,828
EDIT: removed, cannot delete on mobile app.

Sent from my WT19i using xda premium
 
Last edited:

anikanu

Senior Member
Jun 24, 2013
184
16
bikaner
i wud like to use my walkman button to use use as power key to wake device instead of power or home key in stock rom

dis works well in cm based roms but in stock i tried but failed
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    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:)
    2
    /

    # WALKMAN key
    key 200 HEADSETHOOK WAKE

    to end call, BEGIN CALL and music control (the button will work like buttun on headset)
    1
    very good work

    thanks
    1
    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.