Skip to content

Commit 7b9fbad

Browse files
committed
fix an error and add a heads-up
1 parent 714e5b0 commit 7b9fbad

File tree

1 file changed

+4
-1
lines changed
  • content/til/how-to-remap-keys-under-linux-and-wayland

1 file changed

+4
-1
lines changed

content/til/how-to-remap-keys-under-linux-and-wayland/index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
---
22
title: "How to remap keys under Linux and Wayland"
33
date: 2023-03-03
4+
lastmod: 2024-09-09
45
tags:
56
- linux
67
- wayland
78
- keyd
89
- framework laptop
910
---
1011

12+
*Edit 2024-09-09: Please be advised that this post refers to an older version of `keyd` that still used a different configuration format. An older version also stated the config file was stored at `~/.config/keyd`, that was an error on my part. Thanks to a reader for the related heads-up!*
13+
1114
As a German living in Germany with umlauts in my last name and a US ANSI keyboard layout on all my devices[^1] I need to remap some stuff to be able to easily type ä, ö, ü and ß. On Windows I solved this with [Autohotkey](https://www.autohotkey.com/), mapping `AltGr`+`a` to `ä`, `AltGr`+`o` to `ö`, `AltGr`+`u` to `ü` and `AltGr`+`s` to `ß` (well, technically `RAlt` - the right `Alt` key). That has burned itself into my muscle memory now, and so while currently setting up my new Framework laptop under Linux, with Gnome running on Wayland, I was looking for a way to remap the keys to this layout as well.
1215

1316
In the old days, I would have written an `.Xmodmap` file and called it a day, but that no longer works under Wayland. Thankfully however there's a whole new generation of mapping tools that instead of depending on the X server allow remapping right at the kernel input level, and one of them is [keyd](https://github.com/rvaiya/keyd) which I used to solve my umlaut problem, and while at it also added a fancy mod layer and even a mouse layer.
@@ -16,7 +19,7 @@ First of all, in Gnome I set the keyboard layout to "English (intl., with AltGr
1619

1720
![A screenshot of the US international keyboard layout in the Gnome Settings. It's visible that on the third level ä is on q, ö on p, ü on y and ß on s.](us-intl-layout.png)
1821

19-
Then I downloaded, compiled and installed `keyd` and created a config file at `~/.config/keyd/default.cfg` with the following contents:
22+
Then I downloaded, compiled and installed `keyd` and created a config file at `/etc/keyd/default.cfg` with the following contents:
2023

2124
```
2225
[ids]

0 commit comments

Comments
 (0)