Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Bilalh opened this issue Mar 4, 2017 · 5 comments
Closed
Labels

Comments

@Bilalh
Copy link
Contributor

Bilalh commented Mar 4, 2017

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

@Akemi Akemi added the os:mac label Mar 4, 2017
@Akemi
Copy link
Member

Akemi commented Mar 4, 2017

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

@Bilalh
Copy link
Contributor Author

Bilalh commented Mar 4, 2017

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)

@Akemi
Copy link
Member

Akemi commented Mar 4, 2017

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.

@Bilalh
Copy link
Contributor Author

Bilalh commented Mar 4, 2017

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

@Akemi
Copy link
Member

Akemi commented Mar 4, 2017

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

Akemi added a commit to Akemi/mpv that referenced this issue Mar 7, 2017
Akemi added a commit to Akemi/mpv that referenced this issue Mar 9, 2017
@Akemi Akemi closed this as completed in ca1dd7c Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants