句点和逗号的虚拟键 [英] Virtual Keys for period and comma

查看:136
本文介绍了句点和逗号的虚拟键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

句点("。")和逗号(",")是键盘键,但不是VirtualKeys。例如,按下我的英语键盘上的逗号键在调试器中显示为VirtualKey'188',句点为'190'。由于我的笔记本电脑缺少此功能,我无法确定数字
小键盘时间段,但这样的信息可能很好。为什么VirtualKey中缺少句点和逗号键?

Period (".") and comma (",") are keyboard keys, but are not VirtualKeys. For example, pressing the comma key on my English language keyboard shows in the debugger as VirtualKey '188' and period as '190'. I cannot determine a numeric keypad period since my laptop lacks this feature, but such information might be good to have. Why are period and comma keys missing from VirtualKey?

推荐答案

我只能推测它们为什么不存在,但可能是因为理论上这是OEM特定的。如果你看看winuser.h,你会看到这些值是:

I can only speculate as to why they're not there, but probably because that's theoretically OEM specific. If you look at winuser.h you'll see that these values are:

#define VK_OEM_1          0xBA   // ';:' for US
#define VK_OEM_PLUS       0xBB   // '+' any country
#define VK_OEM_COMMA      0xBC   // ',' any country
#define VK_OEM_MINUS      0xBD   // '-' any country
#define VK_OEM_PERIOD     0xBE   // '.' any country


您可以设置自己的常量或查找数值,所有关于虚拟键的标准免责声明都不会映射到特定字符(在我的键盘上这些键可以也生成<或>)

You can either set up your own constants or look for the numeric values, with all the standard disclaimers about virtual keys not mapping to specific characters (on my keyboard these keys can also generate < or >)


这篇关于句点和逗号的虚拟键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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