RFR 8147984: WindowsTerminal should support function keys
stuart.marks at oracle.com
Fri Apr 29 21:49:40 UTC 2016
I finally got a chance to take a look at this. The change looks fine.
It would be nice to have a reference to where the escape sequences are
documented. There are links to the Windows VK_ codes there, which is great. But
there's no reference for the escape sequences that each keypress is mapped to,
e.g. F4 is "ESC O S", and F5 is "ESC [ 1 5 ~" (and what happened to "ESC [ 1 6 ~"??)
I did some searching, and it seems really hard to find a definitive reference.
Perhaps the best reference is "XTerm Control Sequences"  which seems to
document xterm pretty thoroughly, which is what everybody seems to follow
nowadays. It even looks like it's being kept up to date (last modified 2016-02-21).
Anyway I'd suggest adding a comment with a reference to this document.
As a cross-check, these sequences match what my Mac's Terminal.app emits, at
least for unshifted F1-F12. (The Terminal app was probably copied from xterm.)
On 1/22/16 3:41 AM, Jan Lahoda wrote:
> I'd like to enhance the WindowsTerminal in jdk.internal.le with function keys
> handling. The intent is so that jshell can bind actions for shortcuts including
> function keys.
> The patch for adding the function keys support is here:
> An example of a feature that uses/may use this support is here:
> Any comments are welcome!
More information about the core-libs-dev