On Sun, 27 Oct 2013 01:58:32 +0100 Paul "LeoNerd" Evans <[email protected]> wrote:
> > How to detect the modifiers for many terminals in a portable way, > > without requiring installing an obscure library (at least Ubuntu > > must have it), I don't know. > > Then let me explain it to you Bram; it's very simple. > > All modified keys come in a CSI sequence, where the second numeric > argument encodes the modifiers. > > CSI P1; P2 u --- Modified Unicode character P1 > > CSI 1; P2 [ABCDFH] --- Modified Up/Down/Right/Left/End/Home ... You already know this one Bram - vim /already/ recognises modified arrow keys when TERM=xterm. Just extend that logic to the remaining CSI-encoded keys, and accept CSI u as "modified unicode" and we're done. Just please don't hardcode it to only "TERM=xterm", but accept it always. Or at the very least, also accept it under TERM=screen, TERM=tmux, or any other situation where it is likely these keys will come up; but ideally all terminals. Don't make it conditional. -- Paul "LeoNerd" Evans [email protected] ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
signature.asc
Description: PGP signature
