Comments (6)
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.
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.
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.
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.
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.
So it's not xterm compatible, I'll see what I can do, but it may take some time..
from termbox.
Related Issues (20)
- Feature request: enable and generate focus gained/lost events
- Termbox does not start in LXC HOT 2
- Delayed ESC event in INPUT_ESC mode HOT 4
- Build failure on OpenBSD: SIGWINCH HOT 1
- Port https://github.com/nsf/termbox-go/issues/185 HOT 3
- demo doesnt work on Beaglebone
- Python.h: No such file or directory HOT 4
- TB_OUTPUT_256: Cannot use black / write CSI 38;5;0
- Improper select() error handling HOT 3
- Does not work with Python 3.7 HOT 4
- Confution about output mode 216
- KeyCtrlArrow<Up/Down/Left/Right> support HOT 1
- no pkg-config .pc file found HOT 4
- How to build demo examples.
- Documentation of the API could be more helpful HOT 1
- Is this a C library? HOT 2
- Are extended terminfo files being correctly parsed? HOT 2
- Allow reading the front buffer?
- tb_peek_event() buffers inputs with sleep_for() c++11 HOT 1
- Documentation: Termbox crystal-lang wrapper. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termbox.