admin管理员组文章数量:1333442
I'm writing a simple chat program and i'm using conio's _kbhit() with _getwch() to get input from user.
The problem is when I enter altgr combinations (like altgr-s for letter 'ś' in Polish programmers keyboard) the terminal window becomes invisible, but the process is still running (responds to sockets and is visible in task manager). I'm setting the locale to ".UTF8"
Due to my testing I'm sure it's the problem with _kbhit() and not _getwch().
I don't want to switch to PDCurses because I use the windows api and i don't think mixing is a good idea.
I'd maybe go with PeekConsoleInputW() and ReadConsoleInput() but when I tried them the program has noticeable input lag and there was still problems with polish letters
Anyone had that problem before, how did you sort it out? Is there a kbhit() alternative?
本文标签: cWindows kbhit() has weird wide char issuesStack Overflow
版权声明:本文标题:c - Windows kbhit() has weird wide char issues - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742354651a2459167.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论