键盘事件被盗 [英] Keyboard event stolen

查看:98
本文介绍了键盘事件被盗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

简短问题  ;:如何有效地找到响应键盘事件而调用的代码?换句话说,我如何找到处理键盘事件的原因.
在我的应用程序中,我有一个包含文本编辑器的表单(实际上是Scintilla).此控件分配有上下文菜单,并且上下文菜单项设置了快捷键.事实证明,所有菜单项事件处理程序都在分配快捷方式时被调用 按下 除外(复制(Ctrl-C)和粘贴(Ctrl-V)).

 

Short question  : how could I efficiently find the code that gets called in response to a keyboard event ? In other words, how can I find what handles the keyboard event.

In my application I have a form that contains a text editor (Scintilla, in fact). This control has a context menu assigned, with context menu items having shortcut keys set. It turns out, that all menu items event handlers get called when the assigned shortcut key pressed, except Copy (Ctrl-C) and Paste (Ctrl-V).

我怀疑某些组件窃取了该事件.我尝试使用IntelliTrace,但是我对此有一个概念上的问题:我不知道在哪里放置断点,检查呼叫历史记录,因为我不知道会被调用什么.我可以设置一个断点以覆盖表单 ProcessCmdKey方法,但是我无法跟踪后记会发生什么.

I suspect that some component stoles the event. I tried to use IntelliTrace but I have a conceptual problem with this : I do not where to put a breakpoint, to check call history, as I do not know what gets called. I can set a breakpoint to form's overidden ProcessCmdKey method, but I can't follow what happens afterwords.




推荐答案

您可以尝试我的运行时流跟踪您按下按键时所调用内容的工具.
You can try my Runtime Flow tool to trace what is called when you press a key.


这篇关于键盘事件被盗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆