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

Non-user generated inputs on startup #2753

Open
OaHolroyd opened this issue Feb 6, 2024 · 0 comments
Open

Non-user generated inputs on startup #2753

OaHolroyd opened this issue Feb 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@OaHolroyd
Copy link

Sometimes (but not always!) when I run my notcurses program it receives a bunch of garbage input right at the start, for instance:

src/tui.c:1251: KEY PRESSED: 27 [�]
src/tui.c:1251: KEY PRESSED: 93 []]
src/tui.c:1251: KEY PRESSED: 52 [4]
src/tui.c:1251: KEY PRESSED: 59 [;]
src/tui.c:1251: KEY PRESSED: 52 [4]
src/tui.c:1251: KEY PRESSED: 56 [8]
src/tui.c:1251: KEY PRESSED: 59 [;]
src/tui.c:1251: KEY PRESSED: 114 [r]
src/tui.c:1251: KEY PRESSED: 103 [g]
src/tui.c:1251: KEY PRESSED: 98 [b]
src/tui.c:1251: KEY PRESSED: 58 [:]
src/tui.c:1251: KEY PRESSED: 48 [0]
src/tui.c:1251: KEY PRESSED: 52 [4]
src/tui.c:1251: KEY PRESSED: 48 [0]
src/tui.c:1251: KEY PRESSED: 56 [8]
src/tui.c:1251: KEY PRESSED: 47 [/]
src/tui.c:1251: KEY PRESSED: 102 [f]
src/tui.c:1251: KEY PRESSED: 98 [b]
src/tui.c:1251: KEY PRESSED: 48 [0]
src/tui.c:1251: KEY PRESSED: 56 [8]
src/tui.c:1251: KEY PRESSED: 47 [/]
src/tui.c:1251: KEY PRESSED: 56 [8]
src/tui.c:1251: KEY PRESSED: 55 [7]
src/tui.c:1251: KEY PRESSED: 56 [8]
src/tui.c:1251: KEY PRESSED: 98 [b]
src/tui.c:1251: KEY PRESSED: 71 [G]

Currently I'm trying to get around it by calling notcurses_getvec(nc, &ts, ncinputs, len) at the top of the input/action loop to gobble the garbage inputs, but this sometimes (but not always!) hangs somewhere in internal_get.

I'm not sure if this is a notcurses issue or something higher up the chain.

Term/notcurses details:

notcurses 3.0.9 on iTerm2 3.4.20 (macOS 12.6.7)

COLORTERM=truecolor
ITERM_PROFILE=Default
ITERM_SESSION_ID=w1t0p0:FFFFE119-7EC6-4B5A-B390-4D016FFA88FE
LANG=en_GB.UTF-8
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.4.20
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.4.20
TERM_SESSION_ID=w1t0p0:FFFFE119-7EC6-4B5A-B390-4D016FFA88FE
@OaHolroyd OaHolroyd added the bug Something isn't working label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant