Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin peek/poll_event asserts wait_fill_event first read #46

Closed
cardiffman opened this issue Jan 16, 2015 · 7 comments
Closed

Cygwin peek/poll_event asserts wait_fill_event first read #46

cardiffman opened this issue Jan 16, 2015 · 7 comments

Comments

@cardiffman
Copy link

Using the same sequence of steps as keyboard.c, I get an assert in the very first block of reading code of wait_fill_event (currently line 581).

I'm using the latest 32-bit Cygwin on Win7/64. Since I'm using CMake I made a static library for termbox.c and utf8.c to live in.

I tried disabling the initial reading section of wait_fill_event, and that worked, until a resize occurred. Upon resizing the block of reading code in the while loop (currently line 613) would assert on errno==EAGAIN.

@nsf
Copy link
Owner

nsf commented Jan 16, 2015

Never tried it on cygwin. Frankly I don't like cygwin. But I'll take a look at it.

P.S. Termbox go version (github.com/nsf/termbox-go) has native windows implementation. But I'm a bit lazy to do the same for C version.

@cardiffman
Copy link
Author

I have to work within Cygwin all the time and if termbox turns out to meet my needs I don't have to learn curses :) If you come up with anything to try, I'll try it.

@nsf
Copy link
Owner

nsf commented Jan 17, 2015

Installed cygwin, I can confirm it doesn't work indeed and dies with the mentioned assert. I'll see what can be done within next 2-3 days.

@nsf nsf closed this as completed in 9cac600 Jan 19, 2015
@nsf
Copy link
Owner

nsf commented Jan 19, 2015

Take a look, should work now.

@cardiffman
Copy link
Author

It works, in that I can display stuff and read simple keystrokes, and winch doesn't cause a crash. I think there's an issue with key chords like CTRL+PGDN, though. If you run keyboard on Cygwin or Linux (Deb. Wheezy, gnome terminal) and press that combination, you'll just see the display of a "" key (SHIFT and the "`/" key highlighted) because that's the last character of the ANSI escape sequence. It seems like the sequence for CTRL+PGDN begins with a "CSI" (esc+"[") and ends with a "~". It does the same thing under xterm in the aforementioned Linux environment. I can start an issue for this if you like.

@nsf
Copy link
Owner

nsf commented Jan 19, 2015

It's not an issue. Termbox simply doesn't support them. It supports only a common subset of keys most terminals support. And this is a rather limited subset.

@nsf
Copy link
Owner

nsf commented Jan 19, 2015

I understand how inconvenient it is, but that's how it is. There is no way to detect an unknown key sequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants