您好我正在尝试监控何时按下向上或向下箭头键。
Ada.Text_IO.Get_Immediate(User_Input, Key_pressed);
if Key_pressed then
if User_Input = ???? then
null;
end if;
end if;
我要检查什么才能看到按键已被按下。
我已经检查了Ada.Characters.Latin_1库中的控制字符以及一些没有运气的谷歌搜索。
感谢您的帮助。
答案 0 :(得分:1)
嗯,如果你愿意使用SDL,显然有一个阅读扫描码的功能:https://searchcode.com/codesearch/view/13693070/
freenode的#Ada IRC频道的其中一个人正在努力(和IIUC差不多完成了)SDL绑定:https://github.com/Lucretia/sdlada