Klish, VT100 escape sequences are not processed correctly

The klish is a framework for implementing a CISCO-like CLI on a UNIX systems. It is configurable by XML files. The KLISH stands for Kommand Line Interface Shell.


keys Insert, Delete, Home, End, PageUp, PageDown, F5 - F12 and maybe others are interpreted as ArrowUp, which moves up in the history of commands. It's really uncomfortable.

There is a bug in vt100.c, the code tests only the last character of escape sequence, and if no one matches, default tinyrl_vt100_CURSOR_UP will be used. I'm attaching a patch for this, it also disables space at the beginning of empty line (to not display list of available commands). You can use "patch -p0 < klish_space_home_end_del.patch" to apply the patch to stable version 1.4.3.

The update is fully functional with xterm. It seems KDE konsole works too. Home and End keys don't work under gnome-terminal. This is probably bug inside gnome-terminal according to google. Other terminal emulators were not tested.

Hope this will be useful,

Michal Turek

Copyright © 2001-2011 Michal Turek <WOQ (zavináč)>
Valid XHTML 1.0 Strict, Valid CSS