-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Ctrl key bindings doesn't work from cmd.exe command line #3625
Comments
Can anyone else reproduce this behavior? Is my description of the issue confusing somehow (not a native speaker)? |
You mean literally any key together with 'Ctrl'? No, works for me.. |
Yeah, I mean any keybindings with CTRL+<any_other_key> doesn't work when activated from CMD.exe window. Like the snippet below from my input.conf:
Will simply activate the LEFT and RIGHT keybinds, which for me means But, oh well, since you mention it works for you, I guess I need to troubleshoot further. |
Wait...
So, you mean when this window has focus, and not Ok, just tested with For example
And with focus on cmd.exe
Second input should've been with Ctrl But I guess it's not really an issue with mpv then, maybe a limitation of cmd.exe |
Yes, I mean when the cmd.exe windows has focus. For instance, I have a YT music playlist I invoke from the command line with a
Yeah, I was assuming so, but I guess I was seeking some confirmation this was the expected behavior in how cmd.exe parses input or whatever. Maybe some of the devs with more Windows experience can shed some light into the issue? |
Actually, I think it's possible to handle Ctrl bindings. There are definitely improvements to be made in mpv's console input handling. I'll take a look. |
Ok so handling Ctrl+Left/Right is definitely possible, as is handling Ctrl+. There are a lot of limitations compared to handling keystrokes in a GUI window though. Ctrl+ and Ctrl+Alt+ don't work, and in Windows 10, a lot of Ctrl shortcuts are taken by the console window itself (Ctrl+A selects all text, Ctrl+Up/Down scrolls the console window, etc.) I'll submit a patch for this when I get home from work. |
Keyboard input in the console still isn't quite as flexible as it is in the video window. Ctrl+<letter> and Ctrl+LEFT/RIGHT work, but Ctrl+Alt+<letter> and Ctrl+<number> do not. Also, in the new Windows 10 console, a bunch of Ctrl keystrokes including Ctrl+UP/DOWN are handled by the console window and not passed to the application. Unlike in w32_common.c, we can't really translate keyboaard input ourselves because the keyboard layout of the console window (in conhost.exe) doesn't necessarily match the keyboard layout of mpv's console input thread, however, using ToUnicode as a fallback when the console doesn't return a unicode value could be a possible future improvement. Fixes mpv-player#3625
mpv version and platform
OS Name: Microsoft Windows Embedded 8.1 Industry Enterprise
OS Version: 6.3.9600 N/A Build 9600
cplayer: mpv 0.20.0-git-c226bc7 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
cplayer: built on Fri Aug 26 19:57:46 CEST 2016
cplayer: ffmpeg library versions:
cplayer: libavutil 55.29.100
cplayer: libavcodec 57.54.100
cplayer: libavformat 57.48.100
cplayer: libswscale 4.1.100
cplayer: libavfilter 6.56.100
cplayer: libswresample 2.1.100
cplayer: ffmpeg version: N-81464-g5686748
Reproduction steps
Launch any media from cmd.exe command line interpreter; when trying to control the player via keybinds within the cmd.exe window, the "ctrl" part of keybinds are ignored.
Expected behavior
Ctrl keybindings should work.
Actual behavior
Ctrl keybindings doesn't work.
Log files
http://sprunge.us/YHKT
The text was updated successfully, but these errors were encountered: