Gamestudio Links
Zorro Links
Newest Posts
Starting Zorro
by brax
Yesterday at 21:20
Sam Foster Sound | Experienced Indie Game Composer for Hire
by titanicpiano14
Yesterday at 19:09
Lost Key
by jcl
Yesterday at 13:58
Aum119 is ready
by Iglarion
Yesterday at 13:09
Zorro on Linux
by Nanitek
Yesterday at 11:08
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
ZeaL
Who's Online
13 registered (Ch40zzC0d3r, AndrewAMD, Dico, ezaffa, NeoDumont, jenGs, Realspawn, Hredot, preacherX, jyd), 501 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
vivekkumar, Hale75, victrades, htj, anufriyev
17781 Registered Users
Topic Options
Rate This Topic
#466476 - 06/16/17 12:37 Different keyboard layouts
preacherX Online
Senior Member

Registered: 09/09/05
Posts: 309
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: 1081
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 Online
Senior Member

Registered: 09/09/05
Posts: 309
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: 1081
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 Online
Senior Member

Registered: 09/09/05
Posts: 309
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