开发者

Consistent labeling of physical keyboard keys... is it possible?

开发者 https://www.devze.com 2023-01-04 13:06 出处:网络
I have found that the Windows VK_OEM_X values have a tendency to refer to different physical keys, which makes them useless for localization-agnostic game controls.

I have found that the Windows VK_OEM_X values have a tendency to refer to different physical keys, which makes them useless for localization-agnostic game controls.

I am thinking about using scan codes directly by hard-coding them, but that is my last resort.

Is there any other way to reference the physical keys on a 101-key* keyboard using Windows?

edit I also have need to work with far-eastern keyboards, which have the extra buttons next to the space bar.

For example: If I want the '/' key in my source code, I could be referring to the '!' key on a French keyboard. I don't care about what is actually printed on the key itself, nor am I trying to convert k开发者_如何学Goey sequences to characters. I am just looking for a standard labeling system that does not require a massive library of scan codes for different keyboards, let alone detecting the type of keyboard being used.


I don't think so. If anyone knows for sure, it is probably the author of this series.

Let the user's control the key bindings, default them for whatever 3 keyboards your users use most commonly, and prompt otherwise?

0

精彩评论

暂无评论...
验证码 换一张
取 消