Score:1

Mapping `del` functionality onto another key doesn't preserve single-press repeat functionality

de flag

My del key is working just fine with single-press repeat actin (i.e. if I keep it pressed, it keeps deleting characters) but if I try to map it (or the DEL functionality` onto another key, this breaks.

The mapped-onto-key still works for a single press, but not for repeat presses.

My ~/.Xmodmap looks just the same for both keys:

...
keycode 108 = Delete NoSymbol Delete NoSymbol Delete
...
keycode 119 = Delete NoSymbol Delete NoSymbol Delete

(Where 108 == original del key and 119 is the key I'm mapping onto)

I've tried a bunch of other ways of doing this besides Xmodmap, basically, everything I could find online after hours of looking and nothing works.

Even worst, this worked perfectly fine until a few months ago, when an update broke the functionality.

Any help as to how to map the del key functionality onto another arbitrary key while preserving the single-press repeat-action behaviour, would be appreciated, I'm stuck.

This is on ubuntu 20.4

vanadium avatar
cn flag
Have you tried mapping in xkb? https://askubuntu.com/questions/510024/what-are-the-steps-needed-to-create-new-keyboard-layout-on-ubuntu/541899#541899
BaTycoon avatar
mm flag
`xev` provides an environment which shows which keys are repeated by output. Does the keycode 108 stroke not repeat in there either? I see it is ISO_Level3_Shift from other references. [https://unix.stackexchange.com/questions/379699/why-is-altgr-remapped-from-keycode-108-to-keycode-92-lvl3-and-where]
Andra avatar
tr flag
just before assigning `keycode 108` remove Alt_R from modifiers, it depends on your layout (run `xmodmap` to see where Alt_R can be found), for us-layout it is `remove mod1 = Alt_R`
George avatar
de flag
@Andra ... tried, didn't work :/
Andra avatar
tr flag
which layout do you use? what's the output of `setxkbmap -query`?
George avatar
de flag
rules: evdev model: pc105 layout: us,ro,us variant: ,std, options: grp:alt_shift_toggle,mod_led:compose
Andra avatar
tr flag
for me it works also for _ro_. Why two _us_ with no variant - for experimenting?
WU-TANG avatar
cn flag
@George, you said you tried what @Andra said and it didn't work??? before or after you already made changes??? It didn't work for me either AFTER I changed the 108 key (which is the Right Alt Key on my machine)... But when I restored it back to default `xmodmap -e "keycode 108 = Alt_R Meta_R Alt_R Meta_R"`, and then FIRST made the `xmodmap -e "remove mod1 = Alt_R"` change, followed by the `xmodmap -e "keycode 108 = Delete"` assignment, then the Right Alt key started to repeat deletes when held down.
George avatar
de flag
@Andra your solution worked, can you make it a comment so I can mark it as correct
Score:1
tr flag

Just before assigning keycode 108 remove Alt_R from modifiers, it depends on your layout (run xmodmap in terminal to see where Alt_R can be found), for us-layout it is:
remove mod1 = Alt_R
If you already did the mapping (without removing Alt_R from modifiers), first restore the original situation (so that Alt_R exists).

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.