3

I have a external USB Thinkpad keyboard I'm using with my Macbook Pro running Ubuntu 16. I'm trying to remap my Fn+F7, Fn+F8, and Fn+F9 keys to send the XF86AudioPrev, XF86AudioPlay, and XF86AudioNext signals to control what I'm listening to on Spotify.

Using xev I've determined that the keycodes of the keys are 235, 246, and 179, respectively and I'm using the following commands in my .Xmodmap to change the "behavior"of the keys.

keycode 235 = XF86AudioPrev
keycode 246 = XF86AudioPlay
keycode 179 = XF86AudioNext

Testing with xev after, I get the following output, with the correct output for each key.

KeyPress event, serial 37, synthetic NO, window 0x3200001,
    root 0x4cb, subw 0x0, time 11067891, (1436,551), root:(1436,606),
    state 0x0, keycode 246 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XKeysymToKeycode returns keycode: 172
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

However, while listening to music, Spotify doesn't recognize any of the signals. Any ideas what I'm doing wrong or if I have to do anything else?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.