Giter Site home page Giter Site logo

"cygwin" terminal support about termbox HOT 6 CLOSED

nsf avatar nsf commented on July 30, 2024
"cygwin" terminal support

from termbox.

Comments (6)

nsf avatar nsf commented on July 30, 2024

Can you please try: TERM=xterm ./keyboard

Most likely cygwin has compatible xterm termcap (like most terminals). And if it is that way, I will add it to the lib. On the other hand I'm not sure it will work on windows at all. But we'll see.

from termbox.

thejoshwolfe avatar thejoshwolfe commented on July 30, 2024

TERM=xterm made it work pretty well. None of the Ctrl+number combinations worked, although they were reported as overloads of other combinations (such as Ctrl+3 == Ctrl+[). I didn't test everything thoroughly, but it did run.

from termbox.

thejoshwolfe avatar thejoshwolfe commented on July 30, 2024

Another thing to note is that the terminal emulator in this scenario is truly cmd.exe, not anything made by cygwin. I'm guessing cygwin defines the TERM variable because unix expects it, but cygwin actually has no idea what terminal emulator it's running in. When running cygwin's bash inside an alternative terminal emulator for windows called Console 2, $TERM is still "cygwin". That makes "cygwin" as a $TERM value effectively unreliable, but it still seems prudent to assume "cygwin" means cmd.exe.

from termbox.

nsf avatar nsf commented on July 30, 2024

None of Ctrl+number are supported. See NOTES file for partial explanation. I'll add "cygwin" terminal type now as an xterm compatible terminal.

from termbox.

thejoshwolfe avatar thejoshwolfe commented on July 30, 2024

more things that don't line up in cygwin:
F1 is 'A'
F2 is 'B'
F3 is 'C'
F4 is 'D'
F5 is 'E'
up arrow is 'A'
down arrow is 'B'
right arrow is 'C'
left arrow is 'D'
home is ''
end is '
'

The following:
F6-F12, page up, page down, insert, delete
intermittently register as ''. Intermittently as in, keep pressing F7 repeatedly and it will switch between F7 and '' erratically. It looks like this is all the "Key" inputs as opposed to the "Char" inputs except for escape, tab, and backspace. Those 3 are reliable.

This behavior is identical in both cmd.exe and Console 2.

from termbox.

nsf avatar nsf commented on July 30, 2024

So it's not xterm compatible, I'll see what I can do, but it may take some time..

from termbox.

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.