Skip to content

Commit

Permalink
options: disable --input-ime by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
na-na-hi authored and Dudemanguy committed Feb 17, 2025
1 parent 052870b commit 7f4add8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes/input.txt
Original file line number Diff line number Diff line change
@@ -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
12 changes: 11 additions & 1 deletion DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4496,14 +4496,24 @@ Input

``--input-ime=<yes|no>``
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
text in the mpv window.

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
---

Expand Down
1 change: 0 additions & 1 deletion options/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7f4add8

Please sign in to comment.