You are not logged in.

#1 2023-03-11 19:45:12

panden
Member
Registered: 2023-03-11
Posts: 3

Map Home key to grave symbol with udev

Hi all,

I'm trying to map my Home key to create the grave (`) symbol, but I'm struggling.

I've set *KEYBOARD_KEY_7004a=grave*. I have also tested with *KEYBOARD_KEY_7004a=enter* just to make sure that the remapping works, and it does.
The problem is, the mapping gives me the bar (`|`) symbol when hitting the Home key, not the grave.

Any tips why this is the case?

Best,
Andreas

Offline

#2 2023-03-11 20:44:06

panden
Member
Registered: 2023-03-11
Posts: 3

Re: Map Home key to grave symbol with udev

Also:

* I have created the file /etc/udev/hwdb.d/kbd.hwdb where I put the mappings in (and the driver, bus stuff is correct - since some mapping does occour).
* I have a norwegian keyboard layout
* If I set the keyboard layout to US in Gnome (gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us')]), it works -> pressing Home gives grave `. When I set the keyboard to NO, it gives the bar |. This may explain things when I'm in Gnome, but not when I'm in a virtual console, where I still get a bar |. Do not understand if this is related.

Offline

#3 2023-03-15 08:45:35

panden
Member
Registered: 2023-03-11
Posts: 3

Re: Map Home key to grave symbol with udev

For anyone else having the same problem;

The solution was to use keyd (https://github.com/rvaiya/keyd) and create a macro that basically mimics the keystrokes necessary to produce the wanted symbol.

In the case of mapping the pause key to the grave key/symbol, I had to put the following in keyds config file (grave is a dead key, so need some fuzz):

pause = macro(S-= space space backspace)

Offline

Board footer

Powered by FluxBB