Keys.Shift和Keys.ShiftKey的区别 [英] Difference between Keys.Shift and Keys.ShiftKey

查看:1464
本文介绍了Keys.Shift和Keys.ShiftKey的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序,当有键按下我检测,看看是否修改是shift键,但键枚举器具有移位和Shift键。

In my application i detect when a key is pressed and see if the modifier is the shift key but the Keys enumerator has Shift and ShiftKey.

看来事件总是发送Keys.Shift,但那里的Keys.ShiftKey将使用的情况?

It seems the event is always sending Keys.Shift, but is there a case where the Keys.ShiftKey will be used?

(和同样的问题适用于Keys.Control和Keys.ControlKey)

(and the same question applies to Keys.Control and Keys.ControlKey)

感谢您的任何输入。

推荐答案

Keys.Shift 是一个修饰键(用于组合键),而 Keys.ShiftKey 是的 枚举。

Keys.Shift is a modifier key (used for key combinations) while Keys.ShiftKey is a regular key code just like most others in the Keys enumeration.

这篇关于Keys.Shift和Keys.ShiftKey的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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