OSDN Git Service

Add F1-F12 and Ins/Del/Home/End keys
authorJack Palevich <jackpal@google.com>
Sat, 25 Jun 2011 12:07:44 +0000 (20:07 +0800)
committerJack Palevich <jackpal@google.com>
Sat, 25 Jun 2011 12:07:44 +0000 (20:07 +0800)
commitcb368f0f482a0e20ba3096fd90d9810878456434
tree89dc5781260d8f560b335a1239b5f8cb23bb0f9c
parent29e95e964ec41b8c8de1832950b35cb165eba380
Add F1-F12 and Ins/Del/Home/End keys

Contributed by Steven Luo steven+android@steven676.net who writes:

The mapping is as follows:

Fn-[1-9]: F1-F9
Fn-0: F10
Ctrl-9: F11
Ctrl-0: F12
Fn-I: Ins
Fn-X: Del
Fn-H: Home
Fn-F: End

It should be noted that a real VT100 does not have Home/End keys, and as
such, the terminfo entry for TERM=vt100 doesn't contain escape codes for
Home and End.  This bothers some applications, but not others.  The
codes generated match those sent by the Linux console (TERM=linux),
which appears to work fine as a TERM setting since the emulation fixes
in 1.0.30.  xterm sends different escape codes, though; I left the
escape codes at their present values because TERM=xterm causes problems
with some applications.

Addresses GitHub issue #9.
---
I'm unhappy with the reintroduction of different behaviors for the Ctrl
key, but I couldn't think of another choice that's guaranteed to make
sense on any soft keyboard layout.  (Fn-J/K and Fn-(/) are the two other
possibilities that occurred to me.)  Feel free to change.
src/jackpal/androidterm/Term.java