0
votes

I'm trying to custom keybind Ctrl+Meta+i and it does not seem to work.
Here is what I have in my .Xresources file:

XTerm.VT100.Translations: #override \
Ctrl      <KeyPress> I: string("^[JDI")  \n\
Meta      <KeyPress> I: string("^[JDMI") \n\
Ctrl Meta <KeyPress> I: string("^[JDCMI")

When I run the showkey -a command in the terminal to look at what each individual key sequence is generating it spits out: (for Ctrl+i Meta+i and Ctrl+Meta+i respectively):

^[JDI    27 0033 0x1b
         74 0112 0x4a
         68 0104 0x44
         73 0111 0x49
^[JDMI   27 0333 0x1b
         74 0112 0x4a
         77 0115 0x4d
         73 0111 0x49
^[JDI    27 0033 0x1b
         74 0112 0x4a
         68 0104 0x44
         73 0111 0x49

As you can see pressing Ctrl+Meta+i spits out the sequence Ctrl+i.
It's like the terminal is completely ignoring the fact that I'm holding down both Ctrl and Meta at the same time.

1

1 Answers

0
votes

Not sure how this works but the answer is to simply place Ctrl+Meta definition before all the others like so:

XTerm.VT100.Translations: #override \
Ctrl Meta <KeyPress> I: string("^[JDCMI") \n\
Ctrl      <KeyPress> I: string("^[JDI")   \n\
Meta      <KeyPress> I: string("^[JDMI")