Skip to content

Commit

Permalink
fix an error and add a heads-up
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Sep 9, 2024
1 parent 714e5b0 commit 7b9fbad
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
title: "How to remap keys under Linux and Wayland"
date: 2023-03-03
lastmod: 2024-09-09
tags:
- linux
- wayland
- keyd
- framework laptop
---

*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!*

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.

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.
Expand All @@ -16,7 +19,7 @@ First of all, in Gnome I set the keyboard layout to "English (intl., with AltGr

![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)

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

```
[ids]
Expand Down

0 comments on commit 7b9fbad

Please sign in to comment.