I'd like to map the keybinding
Ctrl+Shift+Tab in rxvt-unicode.
I managed to map Ctrl+Tab as follows. The
corresponding entry in .Xresources is
URxvt.keysym.Control-Tab: \033[27;5;9~
Using cat -v confirms that this mapping works:
$ cat -v
^[[27;5;9~
The sequence ^[[27;5;9~ can then be used in applications like
vim for mapping Ctrl+Tab. I would
expect the following .Xresources entry to work the same.
URxvt.keysym.Control-Shift-Tab: \033[27;6;9~
However, cat does not show the correct mapping:
$ cat -v
^[[Z
How to set up the Ctrl+Shift+Tab mapping?
Edit
The mappings
URxvt.keysym.Control-ISO_Left_Tab: \033[27;6;9~
URxvt.keysym.Control-Shift-ISO_Left_Tab: \033[27;6;9~
behave the same. After first pressing Ctrl+Tab, releasing both and then pressing Return twice and then pressing Ctrl+Shift+Tab, releasing all and then pressing Return twice I get the following output:
$ cat -v
^[[27;5;9~
^[[27;5;9~
^[[27;6;9~↵
^[[27;6;9~M-bM-^FM-5
- Case Ctrl+Tab: The first return makes the input appear again as output.
- Case Ctrl+Shift+Tab: The first return produces the sign
↵, the second return produces the last line shown above.
Next edit: More information
What happens if you press ctrl-shift (release both without pressing any keys), then enter, in a different window?
In a different urxvt window? When I press Ctrl+Shift and release both keys a
strident yellow box appears in the lower left corner: KEYCAP PICTURE INSERT
MODE it seems to come from urxvt, it does not appear in other applications.
Or even just ctrl-shift-tab then enter in a different window (i mean not rxvt, like in a gedit window or the web browser or something.)
I get a new line.
What happens if you press shift+ctrl+tab [i.e. shift down, ctrl down, tab, ctrl up, shift up] instead, or vice versa if that was what you were doing?
In urxvt?
$ cat -v
shift+ctrl+tab then enter: ^[[27;6;9~
ctrl+shift+down: ↓
ctrl+shift+up: ↑
shift+down: ^[[b
shift+up: ^[[a
ctrl+down: ^[Ob
ctrl+up: ^[Oa
tab: | | (tab)
I'm trying to narrow down things because I think you might have some sort of mapping on "ctrl+shift" in xcompose or something.
Not that I'm aware of, but you never know.
What is the output of xev when you press "ctrl+shift+tab, enter"?
KeyPress event, serial 32, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311734869, (567,395), root:(567,411),
state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311734971, (567,395), root:(567,411),
state 0x4, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311736110, (567,395), root:(567,411),
state 0x5, keycode 23 (keysym 0xfe20, ISO_Left_Tab), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311736494, (567,395), root:(567,411),
state 0x5, keycode 23 (keysym 0xfe20, ISO_Left_Tab), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311736525, (567,395), root:(567,411),
state 0x5, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311736525, (567,395), root:(567,411),
state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311737530, (567,395), root:(567,411),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
" XmbLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x4800001,
root 0xb4, subw 0x0, time 311737633, (567,395), root:(567,411),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False