Wayland(gnome)でCapslockキーをEscapeに再マップすることはできません。私はGnome Tweaksを試してみました
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
どちらもCapslockキーがEscキーを押すように指示しません。 Xorgではこれを行うことができますが、Waylandでは機能しません。
答え1
あなたはそれを使用することができますdconf:
$ dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:swapescape']"
答え2
gsettings
私にとって効果的です(debian Bullseye、gnome + wayland)。たぶん、値を別々にエスケープする必要があります。
gsettings set org.gnome.desktop.input-sources xkb-options \[\'caps:escape\'\]
ただし、これらの設定はうまく文書化されていません。 gsettingsを使用してn00bとして素朴range
にxkb-options
。
---------- me@my-desktop:~ ----------
$ gsettings range org.gnome.desktop.input-sources xkb-options
type as <-- not informative
---------- me@my-desktop:~ ----------
$ gsettings describe org.gnome.desktop.input-sources xkb-options
List of XKB options. Each option is an XKB option string as defined by xkeyboard-config’s rules files.
貴重な手がかり!
---------- me@my-desktop:~ ----------
$ more /usr/share/X11/xkb/rules/evdev.lst | grep caps:
caps:internal Caps Lock uses internal capitalization; Shift "pauses" Caps Lock
caps:internal_nocancel Caps Lock uses internal capitalization; Shift does not affect Caps Lock
caps:shift Caps Lock acts as Shift with locking; Shift "pauses" Caps Lock
caps:shift_nocancel Caps Lock acts as Shift with locking; Shift does not affect Caps Lock
caps:capslock Caps Lock toggles normal capitalization of alphabetic characters
caps:shiftlock Caps Lock toggles ShiftLock (affects all keys)
caps:swapescape Swap ESC and Caps Lock
caps:escape Make Caps Lock an additional Esc
caps:escape_shifted_capslock Make unmodified Caps Lock an additional Esc, but Shift + Caps Lock behaves like regular Caps Lock
caps:backspace Make Caps Lock an additional Backspace
caps:super Make Caps Lock an additional Super
caps:hyper Make Caps Lock an additional Hyper
caps:menu Make Caps Lock an additional Menu key
caps:numlock Make Caps Lock an additional Num Lock
caps:ctrl_modifier Caps Lock is also a Ctrl
caps:none Caps Lock is disabled