From 7f4add8ddbab053958f37b4a7a2f27ffc5d20096 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 16 Feb 2025 00:15:22 -0500 Subject: [PATCH] options: disable --input-ime by default Enabling IME by default can cause problems when the player is expecting keybinds and not text input. Windows IME implementation mitigates this by switching IME to alphanumeric mode, but this is impossible on Wayland with the text input protocol. Disable it by default and add a note to recommend enabling IME only on demand, like console.lua. --- DOCS/interface-changes/input.txt | 1 + DOCS/man/options.rst | 12 +++++++++++- options/options.c | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DOCS/interface-changes/input.txt b/DOCS/interface-changes/input.txt index ea0f451887..2a0f8dbac1 100644 --- a/DOCS/interface-changes/input.txt +++ b/DOCS/interface-changes/input.txt @@ -1 +1,2 @@ add `--input-ime` to enable or disable the IME on supported VOs (Windows, Wayland) +disable IME by default; set `--input-ime=yes` to enable it on demand diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 2716371418..ecd0d326a5 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4496,7 +4496,7 @@ Input ``--input-ime=`` Enable keyboard input via an active input method (IME) connected to the VO. - (default: yes). The input popup window, if there is any, is always + (default: no). The input popup window, if there is any, is always positioned at the top left of the window. Whether pre-edit text is drawn depends on the platform. You may need to configure your IME to display the pre-edit inside of the input popup window if you cannot read the pre-edit @@ -4504,6 +4504,16 @@ Input Wayland and Windows only. This option is not applicable to terminal input. + .. note:: + + Enabling IME can cause problems with key bindings, because mpv cannot + detect any key presses when they go into the IME pre-edit area. + It is recommended to enable IME on demand only for the duration + while text input is expected. + + The builtin console and input selector enable IME for the duration + of accepting text input. + OSD --- diff --git a/options/options.c b/options/options.c index 8dc3190f28..e85e1e9125 100644 --- a/options/options.c +++ b/options/options.c @@ -261,7 +261,6 @@ const struct m_sub_options vo_sub_opts = { .keepaspect = true, .keepaspect_window = true, .native_fs = true, - .input_ime = true, .taskbar_progress = true, .show_in_taskbar = true, .border = true,