Loading ...
Sorry, an error occurred while loading the content.

Re: Supporting more key modifiers

Expand Messages
  • Paul LeoNerd Evans
    ... Sure. CSI is intended for just this. A CSI sequence is matched by a regexp CSI [ x20- x2f]? [ x30- x3f]* [ x40- x7e] Rougly possibly-one punctuation
    Message 1 of 112 , Apr 4, 2011
    • 0 Attachment
      On Fri, Mar 18, 2011 at 09:15:18PM +1100, Ben Schmidt wrote:
      > A thought occurred to me a couple of days ago: would it be appropriate
      > to actually use CSI as the byte-stream representation? Or something like
      > it. It is a byte-stream representation, right? And it's extensible,
      > right, so it is less likely to need a big overhaul in future? Does it
      > allow for 'private use' stuff? Because Vim needs a way to represent a
      > bunch of other events as keystrokes (mouse clicks, scroll wheel, its
      > magic script-local meta-character thing, representing the CSI escape
      > character itself, etc.). Also, is it easy to skip over CSI sequences if
      > necessary with simple logic?

      Sure. CSI is intended for just this. A CSI sequence is matched by a
      regexp

      CSI [\x20-\x2f]? [\x30-\x3f]* [\x40-\x7e]

      Rougly "possibly-one punctuation character, then a bunch of numbers, ; or
      ;, then finally a signle letter."

      The "private use" area in CSI is the character range \x70-\x7e. One of
      these, CSI u (\x75) is already in use by xterm and libtermkey to encode
      modified Unicode characters. To my knowledge, the remaining are free.
      Plus, vim could even use this encoding internally if it wanted.


      --
      Paul "LeoNerd" Evans

      leonerd@...
      ICQ# 4135350 | Registered Linux# 179460
      http://www.leonerd.org.uk/
    • Paul "LeoNerd" Evans
      On Tue, 21 Oct 2014 20:49:40 +0200 ... pangoterm, or continue prodding at xterm until it does the right thing :) Or provoke your preferred terminal s author
      Message 112 of 112 , Nov 6, 2014
      • 0 Attachment
        On Tue, 21 Oct 2014 20:49:40 +0200
        Christian Brabandt <cblists@...> wrote:

        > > In theory, yes. In practice, last time I looked xterm didn't do it
        > > quite right yet.
        > >
        > > The setting is called modifyOtherKeys but the problem with is was
        > > that it either modifies too little (leaving such pairs as Ctrl-a and
        > > Ctrl-Shift-A indistinct), or modifies too much (using CSI u encoding
        > > for a plain Ctrl-c keypress, thus meaning termios doesn't recognise
        > > it and send a SIGTERM). I have re-raised this with Thomas just now;
        > > I'll see if we can get to a point where it's just in the middle, and
        > > therefore right.
        >
        > So what would be the preferred way to actually see those keys?
        > Installing pangoterm?

        pangoterm, or continue prodding at xterm until it does the right
        thing :)

        Or provoke your preferred terminal's author into fixing it.

        More consensus among terminals => better.

        --
        Paul "LeoNerd" Evans

        leonerd@...
        http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS
      Your message has been successfully submitted and would be delivered to recipients shortly.