Rework keyboard layout
Instead of using an own xkb layout, modify the layout with xmodmap. Use xcape to use Caps_Lock as Ctrl and Escape depending on if it was pressed in combination vs alone. Add hints for xinput.
This commit is contained in:
16
.Xmodmap
Normal file
16
.Xmodmap
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
! Bind Caps_Lock on Escape key, Ctrl_R on Caps_Lock key and Escape on Control_R
|
||||||
|
! The Caps_Lock key is also used for Escape through xcape
|
||||||
|
remove Control = Control_R
|
||||||
|
remove Lock = Caps_Lock
|
||||||
|
|
||||||
|
keycode 9 =
|
||||||
|
keycode 9 = Caps_Lock
|
||||||
|
|
||||||
|
keycode 66 =
|
||||||
|
keycode 66 = Control_R
|
||||||
|
|
||||||
|
keycode 105 =
|
||||||
|
keycode 105 = Escape
|
||||||
|
|
||||||
|
add Control = Control_R
|
||||||
|
add Lock = Caps_Lock
|
||||||
@@ -173,6 +173,8 @@ bindsym $mod+r mode "resize"
|
|||||||
exec_always --no-startup-id ~/.config/i3/monitor-setup.sh &
|
exec_always --no-startup-id ~/.config/i3/monitor-setup.sh &
|
||||||
|
|
||||||
# Touchpad configuration
|
# Touchpad configuration
|
||||||
|
# Find touchpad: `xinput list`
|
||||||
|
# Find options: `xinput list-props $touchpad`
|
||||||
set $touchpad DLL082A:01 06CB:76AF Touchpad
|
set $touchpad DLL082A:01 06CB:76AF Touchpad
|
||||||
exec xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
|
exec xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
|
||||||
exec xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
|
exec xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
|
||||||
@@ -234,8 +236,15 @@ bindsym --release $mod+Print exec gnome-screenshot -a
|
|||||||
# Zoom links in private browser
|
# Zoom links in private browser
|
||||||
bindsym $mod+z exec ~/.local/bin/zoom-links
|
bindsym $mod+z exec ~/.local/bin/zoom-links
|
||||||
|
|
||||||
# keyboard layout (de layout without dead keys and switched ESC and CAPS_LOCK)
|
# Keyboard layout
|
||||||
exec setxkbmap own
|
# German layout without dead keys and escape and capslock switched.
|
||||||
|
# exec setxkbmap de nodeadkeys -option 'caps:swapescape'
|
||||||
|
# German layout without dead keys
|
||||||
|
exec setxkbmap de nodeadkeys -option
|
||||||
|
# Load custom keymap
|
||||||
|
exec xmodmap ~/.Xmodmap
|
||||||
|
# Control is escape when pressed alone and shortly
|
||||||
|
exec xcape -t 250 -e 'Control_R=Escape'
|
||||||
|
|
||||||
# Restore GNOME's settings
|
# Restore GNOME's settings
|
||||||
exec --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec
|
exec --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec
|
||||||
|
|||||||
Reference in New Issue
Block a user