Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Different keyboard layouts #466476
06/16/17 10:37
06/16/17 10:37
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
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?

Re: Different keyboard layouts [Re: preacherX] #466477
06/16/17 10:57
06/16/17 10:57
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
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

Last edited by Ch40zzC0d3r; 06/16/17 10:59.
Re: Different keyboard layouts [Re: Ch40zzC0d3r] #466478
06/16/17 11:34
06/16/17 11:34
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
How does GetKeyboardLayout work and how can I use it in lite-c?

Re: Different keyboard layouts [Re: preacherX] #466479
06/16/17 12:20
06/16/17 12:20
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
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.

Re: Different keyboard layouts [Re: Ch40zzC0d3r] #466498
06/18/17 11:25
06/18/17 11:25
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
Thanks for the info!


Moderated by  aztec, Inestical, Matt_Coles, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1