Score:2

Custom xkb layout on Ubuntu 21.04 Wayland

tr flag
dfv

I have googled various guides on creating a custom keyboard layout using xkb. I want the left alt key to send a control key event. After lots of trial and error I came up with this (based on Estonian keyboard layout):

partial alphanumeric_keys modifier_keys
xkb_symbols "ee_dfv" {
    include "ee(basic)"

    name[Group1]="Estonian (DFV)";

    key <LALT> {
        type[Group1]="ONE_LEVEL",
        symbols[Group1] = [ Control_L ]
    };

    modifier_map Control { <LALT> };
};

I added it to evdev.xml and when I use the GNOME layout visualiser it does show the modified mapping but the keys work as before. Surprisingly the modified mapping works correctly in xterm.

Am I doing something wrong or is there another way of modifying the keyboard layout with Wayland? I successfully used xmodmap for a decade but googling suggests it's not supported by Wayland.

Kris avatar
sr flag
Have you found a solution?
dfv avatar
tr flag
dfv
There's an excellent program called [xremap](https://github.com/k0kubun/xremap) which works with both X and Wayland. The configuration format is even simpler than xmodmap in my opinion and it also supports application-specific remapping.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.