诅咒越来越箭头键

编程入门 行业动态 更新时间:2024-10-24 17:24:09
本文介绍了诅咒越来越箭头键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在试图获得通过诅咒(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.

更多推荐

诅咒越来越箭头键

本文发布于:2023-10-31 06:32:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545300.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:箭头键

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!