Name

console-input-method-control — control a (user-space) virtual terminal input method

Synopsis

console-input-method-control { command | command@vtname ...}

Description

console-input-method-control controls a user-space virtual terminal that is driven by console-input-method(1).

vtname is the (optional) name of the virtual terminal. It can be a directory relative to /run/dev for a user-space virtual terminal input-method. If omitted, it defaults to head0.

command is one of:

.

Generate an "IM Switch" input event.

K

Generate a "Katakana" input event. (Strictly speaking, PC keyboard maps do not use this event, but use a "Katakana/Hiragana/Romaji" event with level 2 shift.)

L

Generate a "Hiragana" input event. (Strictly speaking, PC keyboard maps do not use this event, but use a "Katakana/Hiragana/Romaji" event with level 1 shift.)

R

Generate a "Romaji" input event. (Strictly speaking, PC keyboard maps do not use this event, but use a "Katakana/Hiragana/Romaji" event with level 3 shift.)

G

Generate a "Hangeul" input event. (Strictly speaking, PC keyboard maps do not use this event.)

Y

Generate a "Han/Yeong" input event.

Z

Generate a "Hanja" input event.

N

Generate a "Muhenkan" input event.

C

Generate a "Henkan" input event.

Security

Input method control is done by injecting switch command events into the input stream. Permission to inject things into the input stream is implicitly permission to generate arbitrary keyboard and mouse input to a session. Usually the only accounts with such privileges are the superuser and the accounts used to run the dæmons that form the user-space virtual terminal subsystem.

Input method switching under programmatic control with a tool such as this can unexpectedly switch users away from password prompts and the like. Be careful about granting users the privilege of performing these actions. For best results, only the user physically at the user station(s) where the virtual terminal is being realized should be able to generate input method commands, with actual keyboard actions.

(The kernel virtual terminal system shares these caveats and risks. They are simply rarely discussed.)

Author

Jonathan de Boyne Pollard