Gamestudio Links
Zorro Links
Newest Posts
Dialog box darstellung?
by tagimbul
18 minutes 53 seconds ago
2D/3D Game & Animation Artists AVAILABLE @ Indie price
by zagreusent
Today at 13:12
More than One "File_Open_Read" - Problem?
by Reconnoiter
Today at 11:51
How to keep track of Memory usage
by Reconnoiter
Today at 11:41
ShadeC EVO (Lightmap)
by 20BN
Today at 11:33
AUM Magazine
Latest Screens
Triton Wing
ZeaL
Computer Repair Simulator
Collider (working title)
Space Rider
Who's Online
23 registered (3run, Ch40zzC0d3r, 3dgs_snake, 20BN, Iglarion, Ayumi, Enayn, alibaba, AndrewAMD, FXcoderCM), 427 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
defghi296516, serran0, michal_p, francismake, sqirtle
17663 Registered Users
Topic Options
Rate This Topic
#466476 - 06/16/17 12:37 Different keyboard layouts
preacherX Offline
Member

Registered: 09/09/05
Posts: 288
Loc: Germany
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?

Top
#466477 - 06/16/17 12:57 Re: Different keyboard layouts [Re: preacherX]
Ch40zzC0d3r Online
Serious User

Registered: 10/10/11
Posts: 1073
Loc: Germany
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


Edited by Ch40zzC0d3r (06/16/17 12:59)

Top
#466478 - 06/16/17 13:34 Re: Different keyboard layouts [Re: Ch40zzC0d3r]
preacherX Offline
Member

Registered: 09/09/05
Posts: 288
Loc: Germany
How does GetKeyboardLayout work and how can I use it in lite-c?

Top
#466479 - 06/16/17 14:20 Re: Different keyboard layouts [Re: preacherX]
Ch40zzC0d3r Online
Serious User

Registered: 10/10/11
Posts: 1073
Loc: Germany
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.

Top
#466498 - 06/18/17 13:25 Re: Different keyboard layouts [Re: Ch40zzC0d3r]
preacherX Offline
Member

Registered: 09/09/05
Posts: 288
Loc: Germany
Thanks for the info!

Top


Moderator:  aztec, Inestical, Matt_Coles, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net