Posted By: preacherX
Different keyboard layouts - 06/16/17 10:37
In the manual I can find the key mapping for german and english keyboard layouts. Is there also a function to detect which keyboard layout the player is using? In the german layout for example the open bracket is over the eight but in the english layout it is over the nine. How can I adress the open bracket for both versions correctly?
Posted By: Ch40zzC0d3r
Re: Different keyboard layouts - 06/16/17 10:57
Theres something called virtual keycodes to abstract this problem and pass it over to the OS instead. You dont have to tinker arround with the layouts when coded right.
Anyways, there are windows APIs to do what you want: GetKeyboardLayout
Posted By: preacherX
Re: Different keyboard layouts - 06/16/17 11:34
How does GetKeyboardLayout work and how can I use it in lite-c?
Posted By: Ch40zzC0d3r
Re: Different keyboard layouts - 06/16/17 12:20
https://msdn.microsoft.com/de-de/library/windows/desktop/ms646296(v=vs.85).aspx
You just call it with parameter 0 and check the set bits of the return value.