获取移/ CTRL / ALT状态从鼠标事件? [英] Getting shift/ctrl/alt states from a mouse event?
本文介绍了获取移/ CTRL / ALT状态从鼠标事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的 WPF
应用程序,我怎么弄的<大骨节病>移动骨节病>,<大骨节病> CTRL 骨节病>和<大骨节病>状态在我的鼠标事件处理程序ALT 骨节病>键?我似乎在 MFC
你可以得到从鼠标事件的信息记忆。
In my WPF
App, how do I get the state of the shift, ctrl and alt keys in my mouse event handler? I seem to remember in MFC
you could get that information from the mouse event.
推荐答案
假设你还在鼠标事件处理程序,您可以检查的 Keyboard.Modifiers 。我不认为有反正来从事件本身修改的信息,所以你要直接询问键盘。
Assuming that you're still in the mouse event handler, you can check the value of Keyboard.Modifiers. I don't think that there is anyway to get modifier information from the event itself, so you have to interrogate the keyboard directly.
这篇关于获取移/ CTRL / ALT状态从鼠标事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文