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. They give you nothing by way of modifiers or other interesting things, except perhaps by knowing that key_send is really "shift end". Or sometimes I've seen key_end vs. key_END. They don't seem to have the arbitrary 2^m * n system that libtermkey does (for m modifiers and n keys). I've always intended that libtermkey can live happily alongside termcap/terminfo/curses/whatever; termkey dealing with the terminal->app keyboard input, and curses/et.al. dealing with the application->terminal driving output. libtermkey only ever reads TTY input, so if curses only ever writes it, they should play together very happily. -- Paul "LeoNerd" Evans [EMAIL PROTECTED] ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
signature.asc
Description: Digital signature
