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

video/out/wayland_common: support IME usage via text-input-v3 #15707

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

layercak3
Copy link
Contributor

This is useful for text input in, for example, console.lua. Each character in the commit string gets turned into an mpv key press. Pre-edit strings are not handled, since there's currently no good way to handle that or make it useful to text input scripts. Like win32, which I tested in wine, another limitation is that the composition window is always positioned at the top left of the window, since we cannot get useful positioning hints from mpv scripts. It allows the composition window to be within the window and avoids obstructing the console prompt.

This can be enabled/disabled with --wayland-ime=<yes|no> (default: yes).

This is useful for text input in, for example, console.lua. Each
character in the commit string gets turned into an mpv key press.
Pre-edit strings are not handled, since there's currently no good way to
handle that or make it useful to text input scripts. Like win32, which I
tested in wine, another limitation is that the composition window is
always positioned at the top left of the window, since we cannot get
useful positioning hints from mpv scripts. It allows the composition
window to be within the window and avoids obstructing the console
prompt.

This can be enabled/disabled with --wayland-ime=<yes|no> (default: yes).
Copy link

Download the artifacts for this pull request:

Windows
macOS

@layercak3
Copy link
Contributor Author

The amount of utf-8 characters that get added to the console.lua prompt seems to be a maximum of 7 for me. If the commit string is submitted while the console is hidden, log messages input: No key binding found for key correctly get printed for all characters in the commit string, so this seems like a problem with how input is getting fed to into the scripts.

Similar happens with win32 on wine, though only when the video is playing, and the amount of characters that get added to the prompt differs randomly. If the video is paused, all characters get added to the console prompt.
Also with the terminal cplayer on linux, if I paste some text, only the first few characters appear on the prompt. Definitely a bug with how input gets fed into scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant