更改通过钩子的击键(C/C ++) [英] change a keystroke passing a hook(c/c++)
本文介绍了更改通过钩子的击键(C/C ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用winapi键盘钩来编辑击键?好吧,不是必需的键盘挂钩,而是类似的东西.
is it possible to edit a keystroke using a winapi keyboard hook? well, not neccesary a keyboard hook but something like it..
我想做这样的事情:
用户按下键"A"
我的函数向虚拟键码加1(仅作为示例)
my function adds 1 to the virtual keycode (just an example)
"A"变成"B"
"B"被发送到目标应用程序
and the 'B' is sent to the destination application
谢谢!
推荐答案
First, you need a Keyboardhook. You install a filter and the filter function receives the virtual-key code and the state of the keyboard at the time of the keyboard hook. Then you can change the virtual-key code.
其他链接:
http://msdn.microsoft.com/zh-cn/library/ms644990(VS.85).aspx
http://msdn.microsoft.com/zh-cn/library/ms644984(VS.85).aspx
这篇关于更改通过钩子的击键(C/C ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文