On 2008-04-17, Paul LeoNerd Evans <[EMAIL PROTECTED]> wrote: > On Thu, Apr 17, 2008 at 08:25:56PM +0100, Paul LeoNerd Evans wrote: > > On Thu, Apr 17, 2008 at 09:16:46PM +0200, Bram Moolenaar wrote: > > > > Vim copes poorly with a variety of different keyboard inputs. > > > > > > [...] > > > > > > Where does termcap/terminfo fit into your ideas? > > > > If libtermkey fails to recognise what comes in as valid CSIs, SS3s or > > anything else it might recognise, it will just emit plain bytes again. > > You can then throw those bytes back into the prefix-string-matching code > > based on the termcap/terminfo strings. > > Besides which, it was my understanding that terminfo/termcap really > don't have very much to say about keyboard input at all. If you're > lucky, they say "Oh, by the way, the <Down> key might send this > sequence" and you're on your own to match it.
That is incorrect. The terminfo database contains the definitions of a lot of keys. See "man terminfo" and look at the output of "infocmp xterm. The getch() function in libraries such as ncurses interpret the character sequences corresponding to those keys and return values such as KEY_DOWN, KEY_UP, etc. See "man ncurses" and "man curs_getch". Regards, Gary --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
