From 3b44ef5aaeab5fc6077b2532ff96d7f07eafab30 Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Sun, 29 Jan 2023 21:26:39 +0000 Subject: [PATCH] add keyboard layout X config file --- 50-dotool.conf | 6 ++++++ 80-dotool.rules | 4 ++-- install.sh | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 50-dotool.conf diff --git a/50-dotool.conf b/50-dotool.conf new file mode 100644 index 0000000..e64880e --- /dev/null +++ b/50-dotool.conf @@ -0,0 +1,6 @@ +# This can stop dotool typing guff if you are using a non-us keyboard layout. +Section "InputClass" + Identifier "dotool keyboard" + MatchDriver "libinput" + Option "XkbLayout" "us" +EndSection diff --git a/80-dotool.rules b/80-dotool.rules index b95dca1..0b235e9 100644 --- a/80-dotool.rules +++ b/80-dotool.rules @@ -1,6 +1,6 @@ # This allows users in group input to use dotool without root permissions. KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput" -# This can stop dotool typing guff if you are using a non-us keyboard layout. -# It only seems to affect X11. +# This can stop dotool typing guff if you are using a non-us keyboard layout, +# but it only seems to affect X and 50-dotool.conf achieves that better. SUBSYSTEM=="input", ACTION=="add|change", ATTRS{name}=="dotool keyboard", ENV{XKBLAYOUT}="us" diff --git a/install.sh b/install.sh index 3a2e72c..bcc8c6e 100755 --- a/install.sh +++ b/install.sh @@ -6,4 +6,6 @@ mkdir -p "$1/${2:-usr/local/bin}" || exit cp -v dotool dotoolc dotoold "$1/${2:-usr/local/bin}" || exit mkdir -p "$1/etc/udev/rules.d" || exit cp -v 80-dotool.rules "$1/etc/udev/rules.d" || exit +mkdir -p "$1/usr/share/X11/xorg.conf.d" || exit +cp -v 50-dotool.conf "$1/usr/share/X11/xorg.conf.d" || exit udevadm trigger