Browse Source

Improve capslock escape swapping method

master
Riyyi 3 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 -dpms
# Customize keyboard layout
inputctl -k off
inputctl -k on
# Turn off touchscreen
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.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# 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.

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