Giter Site home page Giter Site logo

Comments (3)

tcolar avatar tcolar commented on September 28, 2024

First will need to add support for meta keys to termbox,
spec: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys

In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is
false, xterm recognizes function key modifiers which are parameters
appended before the final character of the control sequence.

                    Code     Modifiers
                  ---------+---------------------------
                     2     | Shift
                     3     | Alt
                     4     | Shift + Alt
                     5     | Control
                     6     | Shift + Control
                     7     | Alt + Control
                     8     | Shift + Alt + Control
                     9     | Meta
                     10    | Meta + Shift
                     11    | Meta + Alt
                     12    | Meta + Alt + Shift
                     13    | Meta + Ctrl
                     14    | Meta + Ctrl + Shift
                     15    | Meta + Ctrl + Alt
                     16    | Meta + Ctrl + Alt + Shift
                  ---------+---------------------------

For example, shift-F5 would be sent as CSI 1 5 ; 2 ~

So around https://github.com/tcolar/termbox-go/blob/master/termbox.go#L313 will want to add something along the lines of:

if strings.HasPrefix(bufstr, key[:last) {
  if followed by ';', then followed by a number (meta in ascii digit), then followed by key[last] 
     .... now we have the key and the meat value ......
}

from goed.

tcolar avatar tcolar commented on September 28, 2024

Done for shift+ l,r,up.down,home,end
TBD : shift + PgUp, PgDown

from goed.

tcolar avatar tcolar commented on September 28, 2024

done

from goed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.