Giter VIP home page Giter VIP logo

Comments (3)

nsf avatar nsf commented on August 28, 2024

Windows has no problems in that area for sure, there are no terminal emulators of any kind involved. I agree that the limit is probably ok, but if we can resolve that somehow propely, we will. I'm busy with other stuff, so I'm not promising anything soon (except I can add the docs about the limitation).

from termbox-go.

cookieo9 avatar cookieo9 commented on August 28, 2024

AFAICT, to "solve" the problem termbox would either have to do one of:

  • set up the terminal to use a different mode then X10
    • (disadvantage) might drop compatibility, or require multiple chunks of code for each supported mode
    • (disadvantage) might require other parts of the event system to be re-written
    • (advantage) could allow other mouse events (mouse move, button down+up)
  • set up the terminal to use utf-8 encoding
    • (disadvantage) again might affect other events
    • (disadvantage) limit is only raised to 2014(2047-33), but that is probably enough
    • (disadvantage) if the switch to utf-8 doesn't happen on the terminal side, aside from other issues, the limit is now 94 (127-33), because utf-8 only == ascii when < 128
    • (advantage) changes could be as simple as using []rune instead of []byte
  • use one of the other encodings (similar [dis]advantages to utf-8)

I might explore the utf-8 option myself, since all the affected systems (where go is supported) should be recent enough to support utf-8 properly, but don't expect a pull request, as I know very little about both termbox and terminal programming to deal with non-trivial problems, and may just give up.

from termbox-go.

nsf avatar nsf commented on August 28, 2024

Termbox uses xterm and urxvt extended modes now if terminal can handle them. Which overcomes this limitation, but it won't work everywhere. To see how exactly your terminal reports mouse coordinates use _demos/raw_input.go. If you see something like: "\x1b[<0;76;32m", then it's the xterm extended mode. Urxvt one looks similar, it doesn't have a "<" character in the message, e.g.: "\x1b[35;76;32m". X10 mode starts with "\x1b[M".

See commit: 4aa457c414d0392fb8981c975a0b

from termbox-go.

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.