Browse Source

Improve capslock escape swapping method

master
Riyyi 4 years ago
parent
commit
e1ce0b30ce
  1. 4
      .config/xorg/xinitrc
  2. 7
      etc/X11/xorg.conf.d/00-keyboard.conf
  3. 15
      etc/systemd/logind.conf
  4. 13
      etc/udev/rules.d/00-usb-keyboard.rules

4
.config/xorg/xinitrc

@ -12,10 +12,6 @@ xsetroot -cursor_name left_ptr
xset s off xset s off
xset -dpms xset -dpms
# Customize keyboard layout
inputctl -k off
inputctl -k on
# Turn off touchscreen # Turn off touchscreen
inputctl -s off inputctl -s off

7
etc/X11/xorg.conf.d/00-keyboard.conf

@ -0,0 +1,7 @@
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
Option "XkbOptions" "caps:swapescape"
EndSection

15
etc/systemd/logind.conf

@ -1,13 +1,14 @@
# This file is part of systemd. # This file is part of systemd.
# #
# systemd is free software; you can redistribute it and/or modify it # systemd is free software; you can redistribute it and/or modify it under the
# under the terms of the GNU Lesser General Public License as published by # terms of the GNU Lesser General Public License as published by the Free
# the Free Software Foundation; either version 2.1 of the License, or # Software Foundation; either version 2.1 of the License, or (at your option)
# (at your option) any later version. # any later version.
# #
# Entries in this file show the compile time defaults. # Entries in this file show the compile time defaults. Local configuration
# You can change settings by editing this file. # should be created by either modifying this file, or by creating "drop-ins" in
# Defaults can be restored by simply deleting this file. # the system.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
# #
# See logind.conf(5) for details. # See logind.conf(5) for details.

13
etc/udev/rules.d/00-usb-keyboard.rules

@ -1,13 +0,0 @@
# -*- conf -*-
# When usb keyboard is plugged in, run inputctl script
# Requires: run as local user with X variables set (DISPLAY and XAUTHORITY)
SUBSYSTEM=="usb",
ACTION=="add",
ATTRS{idVendor}=="04d9",
ATTRS{idProduct}=="0169",
OWNER="rick",
RUN+="/home/rick/.local/bin/inputctl -k on"
# https://wiki.archlinux.org/index.php/Udev#Execute_on_VGA_cable_plug_in
Loading…
Cancel
Save