better function key support for rxvt-unicode #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR (copied here from zyedidia#30) adds function key support for rxvt-unicode (urxvt) in a way analogous to xterm. Specifically, it can report the following keys:
F1
toF10
, also with any combination ofShift
,Ctrl
andAlt
. (Alt
plus function key is often caught by the window manager, however.) Currently combinations of function keys withShift
are reported asF11
toF20
and the rest as raw key events.F11
andF12
(and up toF20
, if you have them) if used together withShift
and possiblyCtrl
and/orAlt
.Insert
,Delete
,Home
,End
,PageUp
,PageDown
, also with any combination ofShift
,Ctrl
andAlt
(Note that by defaultShift
plusInsert
,PageUp
andPageDown
are caught by urxvt for its own purposes.) Currently, the modifier combinationsShift+Ctrl
andAlt-Shift-Ctrl
are reported as raw key events.Up
,Down
,Right
,Left
, also withShift
orCtrl
, possibly plusAlt
. CurrentlyCtrl-Up
is reported as raw key event (same plusAlt
) andCtrl-Shift-Up
asUp
(same plusAlt
) .The following work with tweaking the user's
.Xresources
:F11
(plusCtrl
) fromShift-F1
(plusCtrl
), same forF12
(up toF20
). I've added newly invented key codes for these cases. To use them, one needs to add something like the following to.Xresources
:F11
works with any combination of modifiers. ForF12
one needs to replace[23
by[24
.Shift-Up
andCtrl-Shift-Up
, and similarly for the other cursor keys. I've instead implemented the "application mode" codes forCtrl-Shift
, see the urxvt documentation. To use them, one needs something like the following in.Xresources
:The PR also seems to work with rxvt-like terminals (tested with Eterm). I don't kow about the original rxvt; I didn't find it in a web search.