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

No key binding found for arrows keys on Windows tablet keyboard #15993

Open
6 tasks done
eNV25 opened this issue Mar 2, 2025 · 5 comments · May be fixed by #15996
Open
6 tasks done

No key binding found for arrows keys on Windows tablet keyboard #15993

eNV25 opened this issue Mar 2, 2025 · 5 comments · May be fixed by #15996
Labels

Comments

@eNV25
Copy link

eNV25 commented Mar 2, 2025

mpv Information

mpv v0.39.0-929-gee07dcf4c Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Mar  2 2025 00:10:18
libplacebo version: v7.350.0 (v7.349.0-38-g02f4f98-dirty)
FFmpeg version: N-118594-ge8d4c5598
FFmpeg library versions:
   libavcodec      61.33.102
   libavdevice     61.4.100
   libavfilter     10.9.100
   libavformat     61.9.107
   libavutil       59.58.100
   libswresample   5.4.100
   libswscale      8.13.100

Other Information

- Windows version:
  Windows 10 32-bit (Microsoft Windows [Version 10.0.19044.5487])
  Windows 11 (Microsoft Windows [Version 10.0.26100.3194])
- GPU model, driver and version:
  Intel HD Graphics on Intel Atom Z3735G
  Intel UHD Graphics on Intel Core i3-8145U
- Source of mpv: https://github.com/shinchiro/mpv-winbuild-cmake/releases/tag/20250302, i686 and x86_64-v3
- Latest known working version: n/a
- Issue started after the following happened: n/a

Reproduction Steps

  1. Enable touch keyboard on taskbar: https://support.microsoft.com/en-us/topic/enable-and-disable-the-touch-keyboard-in-windows-e2b05375-908d-45ec-b7f7-729349a10c7a
  2. Start mpv and open the touch keyboard from the taskbar
  3. Type ` to activate REPL
  4. Type the arrow keys on the touch keyboard

Expected Behavior

It should work like the old accessibility On-Screen Keyboard. It seems they use different key codes for some reason.

Actual Behavior

Shows error No key binding found for KP_{LEFT,UP,RIGHT,DOWN}

Windows 10 32-bit: Image
Windows 11:

Image

Log File

output.txt

Sample Files

https://www.youtube.com/watch?v=dQw4w9WgXcQ

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@eNV25 eNV25 added the os:win label Mar 2, 2025
@eNV25
Copy link
Author

eNV25 commented Mar 2, 2025

It seems the solution would be to alias KP_{LEFT,UP,RIGHT,DOWN} to {LEFT,UP,RIGHT,DOWN} in mpv, so that scripts can work without modification.

@eNV25
Copy link
Author

eNV25 commented Mar 2, 2025

It looks like the touch keyboard arrow keys are not detected by SharpKeys or ScancodeMap (it shows up as "disabled" "00_00"). It's not possible to remap on the windows side.

@kasper93
Copy link
Contributor

kasper93 commented Mar 3, 2025

It should work like the old accessibility On-Screen Keyboard. It seems they use different key codes for some reason.

Looks like those arrows keys are sent without ENHANCED_KEY flag (like the numpad ones). Not sure what we can do here, except from merging all non-numpad keys to their original keys.

There were some changes from @na-na-hi already to alias other keys, like
d06f3d3
8c6ad1d

If we would alias all arrows, then why not also other keys too?

I think it's nice that mpv has all keys configurable, but at the same time, it may not always be desirable.

@eNV25
Copy link
Author

eNV25 commented Mar 3, 2025

There were some changes from @na-na-hi already to alias other keys, like
d06f3d3
8c6ad1d

Those changes seem to remove aliases and require scripts to have separate bindings for keypad keys in scripts.

If we were to follow that example we would need to find usages of arrow keys like LEFT and add a new binding to the corresponding keypad key like KP_LEFT.

kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

Same as 8c6ad1d.
Fixes: mpv-player#15993
@eNV25
Copy link
Author

eNV25 commented Mar 3, 2025

@zhongfly pointed out that the keypress command can be used: #15996 (comment)

The following input.conf mapping works.

KP_LEFT repeatable keypress LEFT
KP_UP repeatable keypress UP
KP_RIGHT repeatable keypress RIGHT
KP_DOWN repeatable keypress DOWN

kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

More generic way of 8c6ad1d and
d06f3d3.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

More generic way of 8c6ad1d and
d06f3d3.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

More generic way of 8c6ad1d and
d06f3d3.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

More generic way of 8c6ad1d and
d06f3d3.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

Same as 8c6ad1d.

Fixes: mpv-player#15993
kasper93 added a commit to kasper93/mpv that referenced this issue Mar 3, 2025
They still can be remapped individually by users, but let's duplicate
them by default.

Same as 8c6ad1d.

Fixes: mpv-player#15993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants