Score:2

Create a custom keyboard layout

id flag

Is there an easy way or an interactive tool that helps you create a custom keyboard layout? so far I think I've tried everything :

  • Use a python script found on github to convert a layout made with microsoft keyboard creator into an xkb file (it didn't work)
  • Try to use key Mapper
  • Manually edit the xkb file of the layout using xev command to identify the key symbols
  • Try to install keyboard Layout tool (didn't work, I cannot install it )

I feel very frustrated because on windows I have a simple tool while on Linux I cannot do something so simple. I just want a tool to create a layout and then configure it

guiverc avatar
cn flag
Ubuntu 20? Do you mean Ubuntu Core 20? as the *year* products are different to the more common *year.month* products (eg. 20 is not 20.04). The *year* products are usually used on *headless* devices, appliances or in the cloud; run with different (*confined*) security models, don't use *deb* packages etc.
id flag
Sorry i'm new to this world, i'm referring to the latest ubuntu lts version
vanadium avatar
cn flag
Relevant question. Indeed, a.f.a.i.k., there is no easy tool. One can edit xkb files, but it is extremely obscure and complicated, and requires root permissions. The old `xmodmap` tool was easy to change a few keys, but does not work reliably anymore (will for example not work anymore after a resume) and does not work on Wayland.
Score:2
cn flag

Hoping that a better answer exists and comes around, I answer here what I believe is the current state. No: there is no easy tool in Linux to create your own keyboard layout from scratch.

For changing/swapping a few keys, the tool xmodmap was very suited. However, it is not anymore very reliable, may stop working after for example suspending the computer, etc. In addition, it will not work on Wayland, the display driver that gradually will replace the current old Xorg display server.

Editing xkb files is, a.f.a.i.k., the only way forward here. You need to be root for this - i.e., there is no way to create a keyboard layout with user priviledges only, that only your user can see and use.

A guide is available in the official Ubuntu documentation. However, it is sparse, but it can get you started and have you quickly appreciate the complexity of the system.

To be safe when changing a keyboard layout, create a new one. Any new layout can modify existing layouts. Experimenting on a new layout rather than modifying existing ones 1) safeguards you from breaking these and 2) will be preserved upon future updates. Still, it is, if needed, possible to reset the system keyboard data by reinstalling the xkb-data package.

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.