本文介绍了诅咒越来越箭头键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在试图获得通过诅咒(ncurses的)从方向键的输入也不会捕捉尽可能KEY_UP等我用键盘功能与真正的说法,但仍残培返回逃脱序列。我如何通过函数getch(返回的值筛选),并专门抢箭头键?
In trying to get input from the arrow keys via curses (ncurses) it won't catch as KEY_UP etc. I used the keypad function with a true argument but getch still returns an escaped sequence. How do I sift through the values returned by getch() and grab the arrow keys specifically?
推荐答案我是存储残培()呼吁为char的,当他们被认为是int的。在开关后完美的作品。
I was storing getch() calls as char's when they were supposed to be int's. Works perfectly after the switch.
更多推荐
诅咒越来越箭头键
发布评论