问题描述
句点("。")和逗号(",")是键盘键,但不是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?
推荐答案
#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 >)
这篇关于句点和逗号的虚拟键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!