TL:DR : I just want xterm to not do anything special when I start typing ctrl+shift+u so I can write special character, so I must remove the ctrl+u default keybind.

I’m using xterm on a laptop (no discrete gpu and pretty bad integrated graphics, so gpu-accelerated ones like kitty are counterproductive, and I use i3 so an xorg based one sounds better). I also like using vim.

I’m also using a qwerty keyboard, but sometimes write in French and need accents. I’ve memorized the codes for those I often need, like ctrl+maj+u+e+9 for é, but it doesn’t work in xterm because it executes the ctrl+u keybind (delete previous characters and then types “(” (because it’s maj+9).

So, following online guides, I’ve created a .Xresource file with the following code:

XTerm.VT100.translations: #override \n\
   Ctrl <Key>U: none

And I also added the line

exec xrdb ~/.Xresources

But to no avail, even when restarting the x session or manualy running xrdb ~/.Xresources.

What am I doing wrong?

  • nyan@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    23 days ago

    Um, if your primary use is typing accented letters, why don’t you just set a compose key? The character sequences you need to type are much more intuitive, and you don’t get this type of problem.

    In my case, I have scroll lock (the most useless key on the keyboard) set as a compose key. To get “é”, I type scroll lock, then e, then '.

    You can set a compose key using setxkbmap, for instance setxkbmap -option compose:sclk. (If scroll lock isn’t to your liking, there are a number of other modifier keys that can be used instead—list here, starting around line 810.) You can also specify it permanently using X configuration files, although I don’t know the exact method.

    • loaExMachina@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      23 days ago

      Thank you, I’ll try. Tho I’d still be interested to by the answer to my original question, since I might want to change other keybinds later…