[svlug] Extended Keyboard Input Utility For Bash?
Tim Utschig
tim at tetro.net
Fri Mar 23 20:13:19 PDT 2007
On Fri, Mar 23, 2007 at 07:01:59PM -0700, Mark S Bilk wrote:
> And I've written a C program to return the extended
> codes like UP and F1, but it has a fixed translation
> for the escape sequences (for KDE konsole) implemented
> as a decision tree.
Maybe use [n]curses' keyname() function?
<quote src="man 3 keyname">
char *keyname(int c);
The keyname routine returns a character string corresponding to the
key c. Control characters are displayed in the ^X notation. Values
above 128 are either meta characters, shown in the M-X notation, or
the names of function keys, or null. The corresponding key_name
returns a character string corresponding to the wide-character value
w. The two functions do not return the same set of strings; the
latter returns null where the former would display a meta character.
</quote>
--
- Tim Utschig <tim at tetro.net>
More information about the Svlug
mailing list