Skip to content

Media Keys Key NEXT and Key PREV do not work on some external keyboards. #4204

Closed

Description

@Bilalh

Reproduction steps

Press the Key NEXT/PREV key on a (non apple) external keyboard.

Expected behaviour

The Key NEXT/PREV action is executed.

Actual behavior

Nothing happens.

Notes

The Key PLAY on the (non apple) keyboard works correctly.

The NEXT/PREV keys on the (non apple) keyboard works correctly in other apps including VLC, iTunes, QuickTime Player and Spotify.

The keyboard used is a Rii i8+BT

mpv version and platform

OS X 10.11.6 (15G1217) on a MacBook Pro (Retina, Mid 2012)

mpv git-85c8556 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
 built on Sat Mar  4 18:34:51 GMT 2017
ffmpeg library versions:
   libavutil       55.34.101
   libavcodec      57.64.101
   libavformat     57.56.101
   libswscale      4.2.100
   libavfilter     6.65.100
   libswresample   2.3.100
ffmpeg version: 3.2.4

Log file

Running mpv --no-config --no-osc --no-load-scripts --log-file=output.txt XKCD_1190.webm b.webm

http://sprunge.us/ZBjj

Activity

  1. Akemi commented on Mar 4, 2017

    @Akemi
    Member

    what does mpv --input-test --force-window --idle say when you press those keys, does it recognise the keys?

  2. Bilalh commented on Mar 4, 2017

    @Bilalh
    ContributorAuthor

    Nothing is outputted when using mpv --input-test --force-window --idle and pressing Key NEXT or Key PREV.

    Key PLAY gives the following:

    [input] Key PLAY is bound to:
    [input] 1.  'cycle pause' in <builtin>:1 (default)
    
  3. Akemi commented on Mar 4, 2017

    @Akemi
    Member

    could you pls try my cocoa_keymaps branch with mpv --input-test --force-window --idle? since i don't know what your keys map to i am poking a bit in the dark atm, so i added mappings for the two most likely candidates.

    does it recognise the keys now, should be REWIND and FORWARD? if they are not recognised does your terminal output something like ----------- handleMediaKey mk_code: X -----------, if yes provide me with the key code of both keys. if they are recognised you can bind them to your desired function.

  4. Bilalh commented on Mar 4, 2017

    @Bilalh
    ContributorAuthor

    Success, output shown below.

    ----------- handleMediaKey mk_code: 18 -----------
    [input] Key REWIND is bound to:
    [input] 1.  'seek -60' in <builtin>:1 (default)
    ----------- handleMediaKey mk_code: 17 -----------
    [input] Key FORWARD is bound to:
    [input] 1.  'seek 60' in <builtin>:1 (default)
    

    Looking at the keyboard keys more closely, they are rewind and forwards keys

    Using your cocoa_keymaps branch version

    mpv git-41b57e2 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
     built on Sat Mar  4 22:12:05 GMT 2017
    ffmpeg library versions:
       libavutil       55.34.101
       libavcodec      57.64.101
       libavformat     57.56.101
       libswscale      4.2.100
       libavfilter     6.65.100
       libswresample   2.3.100
    ffmpeg version: 3.2.4
    

    Thanks

  5. Akemi commented on Mar 4, 2017

    @Akemi
    Member

    you are welcome. i will push the fix to master soonish, probably when i am done with the touch bar PR.

  6. added 3 commits that reference this issue on Mar 7, 2017
    e6b5e30
    4c7cf45
    ca1dd7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions