From 53fc4dd318e7f861ab8c478c4803f8f280bfa79a Mon Sep 17 00:00:00 2001 From: Rupus Reinefjord Date: Sat, 28 Jan 2023 13:48:57 +0100 Subject: [PATCH] new blog post --- public/blog/2023-01-28_remap-prtsc.html | 107 ++++++++++++++++++++++++ public/index.html | 1 + 2 files changed, 108 insertions(+) create mode 100644 public/blog/2023-01-28_remap-prtsc.html diff --git a/public/blog/2023-01-28_remap-prtsc.html b/public/blog/2023-01-28_remap-prtsc.html new file mode 100644 index 0000000..025f837 --- /dev/null +++ b/public/blog/2023-01-28_remap-prtsc.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + Remap PrtSc to Meta/Super + + + +
+

Index

+ +
+
+

Remap PrtSc to Meta/Super

+ +
+ +

+ On my Thinkpad T14s Gen 1, the right meta/super/windows key is replaced + by a "PrtSc" key. I use Sway as my + Wayland compositor and use the meta keys a lot to navigate and manage + windows, and having only a left meta key makes some chords difficult to + use. I thus wanted to remap PrtSc to Meta. +

+

+ I found keyd which looked + promising. To use this, I need to know what key PrtSc maps to in the + OS. Using evtest: + +

Event: time 1674905628.580346, type 4 (EV_MSC), code 4 (MSC_SCAN), value b7
+Event: time 1674905628.580346, type 1 (EV_KEY), code 99 (KEY_SYSRQ), value 1
+ + It seems like it is interpreted as SysRq. +

+

+ To only remap this keyboard and not any other keyboards connected to + the computer, we'll need the vendor and product id of the built-in + keyboard. That can be found in /proc/bus/input/devices: + +

$ cat /proc/bus/input/devices
+I: Bus=0011 Vendor=0001 Product=0001 Version=ab83
+N: Name="AT Translated Set 2 keyboard"
+...
+
+ + 0001:0001. +

+

+ Next we'll configure keyd: + +

$ cat /etc/keyd/default.conf
+[ids]
+0001:0001
+
+[main]
+sysrq = rightmeta
+
+ + Restart keyd and we're done! The PrtSc key is interpreted as meta + instead. +

+
+
+ + + + diff --git a/public/index.html b/public/index.html index 91e0543..bd28879 100644 --- a/public/index.html +++ b/public/index.html @@ -68,6 +68,7 @@

Blog