better function key support for rxvt-unicode #30
+61
−79
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 adds function key support for rxvt-unicode (urxvt) in a way analogous to xterm. Specifically, it can report the following keys:
F1toF10, also with any combination ofShift,CtrlandAlt. (Altplus function key is often caught by the window manager.) Currently combinations of function keys withShiftare reported asF11toF20and the rest as raw key events.F11andF12(and up toF20, if you have them) if used together withShiftand possiblyCtrland/orAlt.Insert,Delete,Home,End,PageUp,PageDown, also with any combination ofShift,CtrlandAlt(Note that by defaultShiftplusInsert,PageUpandPageDownare caught by urxvt for its own purposes.) Currently, the modifier combinationsShift+CtrlandAlt-Shift-Ctrlare reported as raw key events.Up,Down,Right,Left, also withShiftorCtrl, possibly plusAlt. CurrentlyCtrl-Upis reported as raw key event (same plusAlt) andCtrl-Shift-UpasUp(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:F11works with any combination of modifiers. ForF12one needs to replace[23by[24.Shift-UpandCtrl-Shift-Up, contrary to the documentation, and similarly for the other cursor keys. I've implemented the documented codes. 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.