2

I have this Logitech G105 Keyboard and I would like to disable Dead Keys, and still keep the Keyboard's Layout.

I am using English (US, alternative international) since it matches my keyboard buttons.

The problem is that no matter what Layout I choose, I still have Dead Keys enabled.


Edit 2023: the given answer seems to no longer work...

Some xev output

KeyPress event, serial 34, synthetic NO, window 0x3801,
    root 0x247, subw 0x0, time 5354294, (54,90), root:(292,308),
    state 0x10, keycode 49 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XmbLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3801,
    root 0x247, subw 0x0, time 5354408, (54,90), root:(292,308),
    state 0x10, keycode 49 (keysym 0x60, grave), same_screen YES,
    XLookupString gives 1 bytes: (60) "`"
    XFilterEvent returns: False
2
  • Welcome to SuperUser! You will probably get better expertise on AskUbuntu.
    – fosslinux
    Jul 27, 2016 at 1:01
  • I tried there, no actual answer. Only "use a keyboard layout without dead keys"
    – TermoZour
    Aug 5, 2016 at 10:16

2 Answers 2

2

There are two keysyms for grave, grave and dead_grave, by default dead_grave is set to the ` key. xmodmap can be used to change it, and should be in Ubuntu by default (with arch install xorg-xmodmap).

To change it from the default dead_grave to grave, run:

xmodmap -e "keycode  49 = grave notsign grave notsign brokenbar notsign brokenbar notsign"

The rest of the values are various modifiers, e.g. the second one is shift.

If you want this to be permanent, create ~/.Xmodmap, and then add just:

keycode  49 = grave notsign grave notsign brokenbar notsign brokenbar notsign

If there are any other dead keys you're having trouble with, run:

xmodmap -pke | grep dead

And it should give you a list of dead keys. Alternatively you could run:

xmodmap -pke >> ~/.Xmodmap

You will then have a full list of keyboard keys and their sym values in .Xmodmap, which makes it easy to change your dead keys and any other keys to whatever custom layout you like.

4
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    May 14, 2020 at 12:22
  • This no longer appears to work in 22.04. I have $ xmodmap -pke | grep grave keycode 49 = grave notsign grave notsign brokenbar notsign bar bar grave notsign bar bar but I still get an underline when I type a backtick, and if I type a vowel, it adds the accent to the vowel. Is there some new mechanism to implement dead keys?
    – EoghanM
    Dec 19, 2022 at 17:34
  • @EoghanM run xev, then press the key and see what keycode comes up in the output.
    – Levi H
    Feb 16, 2023 at 0:17
  • @LeviH I have updated the question with this info
    – EoghanM
    Mar 23, 2023 at 11:21
0

As well as @Levi H's answer, I believe that the new undesirable behaviour I was experiencing was some sort of extra thing that my keyboard layout was doing, which was "English (UK, intl., with dead keys)". Another layout also produces this undesirable behaviour; "English (UK, extended, Windows)" which was likely why I missed it previously.

Anyhow the fix was to switch to "English (UK)" or "English (intl., with AltGr dead keys)".

The new undesirable behaviour had the backtick character appear, but underlined, and then it would swallow up certain of the next characters if it could find a character which was a composite, e.g. ` + w =

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .