请问如何判读键盘上的按键是否处于按下状态

loading1412 2013-01-03 02:27:57
如何用一个语句来判读如"X"键是否处于按下状态,VB中有判读按键电位的语句么(提供个C语言语句也可以)
尝试编写连发时想到的,keypress,keydown,keyup只能模拟键盘操作;gelastkey也不能判断键盘状态
...全文
122 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
东方之珠 2013-01-03
  • 打赏
  • 举报
回复
sosoben 2013-01-03
  • 打赏
  • 举报
回复
GetKeyState If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
bcrun 2013-01-03
  • 打赏
  • 举报
回复
GetKeyState

7,765

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧