diff --git a/public/blog/2023-01-28_remap-prtsc.html b/public/blog/2023-01-28_remap-prtsc.html index ef4e743..d19515e 100644 --- a/public/blog/2023-01-28_remap-prtsc.html +++ b/public/blog/2023-01-28_remap-prtsc.html @@ -62,20 +62,25 @@ 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
@@ -83,10 +88,13 @@ N: Name="AT Translated Set 2 keyboard"
...
+
0001:0001
.
Next we'll configure keyd: +
$ cat /etc/keyd/default.conf
[ids]
@@ -96,6 +104,7 @@ N: Name="AT Translated Set 2 keyboard"
sysrq = rightmeta
+ Restart keyd and we're done! The PrtSc key is interpreted as meta instead.