Ubuntu 24.04LTSでのキー配列の調べ方
localectl
% localectl status
System Locale: LANG=ja_JP.UTF-8
VC Keymap: (unset)
X11 Layout: us
X11 Model: pc105setxkbmap
% setxkbmap -print -verbose 10
Setting verbose level to 10
WARNING: Running setxkbmap against an Xwayland server
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules: evdev
model: pc105
layout: jp
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete+japan
symbols: pc+jp+inet(evdev)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+japan" };
xkb_symbols { include "pc+jp+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};各キーのキーコード(keycode)を調べる場合
% xev
~略~
KeyPress event, serial 35, synthetic NO, window 0x400001,
root 0x3a4, subw 0x0, time 3686508, (-229,-122), root:(1800,541),
state 0x0, keycode 49 (keysym 0xff2a, Zenkaku_Hankaku), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 35, synthetic NO, window 0x400001,
root 0x3a4, subw 0x0, time 3686524, (-229,-122), root:(1800,541),
state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XmbLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x400001,
root 0x3a4, subw 0x0, time 3686724, (-229,-122), root:(1800,541),
state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: FalseX11でのキーボード情報
% xset -q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 400 repeat rate: 40
auto repeating keys: 00ffffffdffffbbf
fadfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 0
Colors:
default colormap: 0x24 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
built-ins
DPMS (Display Power Management Signaling):
Server does not have the DPMS ExtensionX11のキーボード配置の設定ファイル
% ls -l /etc/vconsole.conf lrwxrwxrwx 1 root root 16 2月 15 17:09 /etc/vconsole.conf -> default/keyboard % cat /etc/default/keyboard # KEYBOARD CONFIGURATION FILE # Consult the keyboard(5) manual page. XKBMODEL="pc105" XKBLAYOUT="us" XKBVARIANT="" XKBOPTIONS="" BACKSPACE="guess"