Ubuntu – How to implement a custom dead-key based keyboard layout


I'm a workman user, and I've really grown to like the dead-key variant on osx.

The idea of using 'dead' keys is based on assumption that pressing 2
easy keys is better than pressing 1 hard key. So to make it easier to
type (programming) characters/symbols, we're going to press an easily
reachable key (which will NOT output any character), release it and
then press another easily reachable key to produce, say, @ character.

In this layout the COMMA key is a dead key, pressing it will cause
keyboard enter a state in which a single stroke of other keys will
output a different character than normal state. After that single
stroke, the keyboard returns to its normal state.

For example, you'd press COMMA to enter the special state. Now if you
strike the A key the output will be a forward slash "/". To see how to
create other characters, refer to following images for more info.

To produce the COMMA character itself, just hit SPACE after entering
'dead' state.

I'd like to achieve this functionality on Lubuntu (19.04) too, but I don't even know where to start… or if something like this is even possible.
Could you please give me some pointers?

Best Answer

From the site you provided


This gets fed into xmodmap

xmodmap - utility for modifying keymaps and pointer button mappings in X

   The xmodmap program is used to edit and display the keyboard modifier map and keymap table
   that are used by client applications to  convert  event  keycodes  into  keysyms.   It  is
   usually  run from the user's session startup script to configure the keyboard according to
   personal tastes.


(Pointers only, For LXQt Lubuntu you maybe able to use the Keyboard and Mouse settings (Keyboard Layout) found through menu search using "keyb")

For more information :

Problems with xmodmap How do I set Xmodmap on login?