Posted By: preacherX
[paid] Programmer wanted // different keyboard layouts - 06/19/17 13:36
In my game the players have to use their keyboards but not only normal letters but also these special characters: " {} [] () , ; . - +
Now I need a function which can detect if theses keys are pressed. At the moment I'm using if(key_8 ==1 && (key_shiftr==1||key_shiftl==1)) for detecting if the ( is pressed. But this works only for german keyboard layouts, in other parts of the world ( is not on key 8.
Now I'm looking for a function which can detect these keys no matter which layout is used.
I found something at Microsoft which could be useful:
https://msdn.microsoft.com/en-us/library/system.windows.input.key(v=vs.110).aspx
But I don't know how to use it in lite-c...
Now I need a function which can detect if theses keys are pressed. At the moment I'm using if(key_8 ==1 && (key_shiftr==1||key_shiftl==1)) for detecting if the ( is pressed. But this works only for german keyboard layouts, in other parts of the world ( is not on key 8.
Now I'm looking for a function which can detect these keys no matter which layout is used.
I found something at Microsoft which could be useful:
https://msdn.microsoft.com/en-us/library/system.windows.input.key(v=vs.110).aspx
But I don't know how to use it in lite-c...