Place an InputClass fragment under /etc/X11/xorg.conf.d and set a keyboard layout to jp.
Which option line is appropriate?
Option "XkbLayout" "jp" sets the XKB keyboard layout; use Match conditions to target the intended device.
Detailed explanation
Option "DisplayLayout" "jp"Incorrect. DisplayLayout is not the XKB layout option.
Incorrect. DisplayLayout is not the XKB layout option.
Option "XkbModel" "jp"Incorrect. XkbModel selects a keyboard model, not the layout name.
Incorrect. XkbModel selects a keyboard model, not the layout name.
Option "XkbLayout" "jp"Correct. XkbLayout jp selects the Japanese XKB layout.
Correct. XkbLayout jp selects the Japanese XKB layout.
Option "Keyboard" "layout=jp"Incorrect. Keyboard layout=jp is not the standard InputClass option syntax.
Incorrect. Keyboard layout=jp is not the standard InputClass option syntax.
Try it yourself
An example you can run in a temporary verification environment.
file=$(mktemp); printf '%s\n' 'Section "InputClass"' ' MatchIsKeyboard "on"' ' Option "XkbLayout" "jp"' 'EndSection' > "$file"; grep -F 'Option "XkbLayout" "jp"' "$file"; rm -f -- "$file"Expected result
Option "XkbLayout" "jp"Key points
- InputClass configures input
- XkbLayout selects layout
- Match conditions narrow scope
Notes
- Environment: 一時設定断片の文字列確認 / Xorg再起動なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.