Closed alimtunc closed 1 year ago
To my knowledge there is no technique to detect the layout of a keyboard. There is Keyboard.getLayoutMap()
but it doesn't return anything very interesting and it is experimental. In any case using event.code
is the right way to not worry about the QWERTY/AZERTY configuration 👍🏻
Yes sure, but the point was for the visual letter on keyboard haha
@alimtunc I'm not sure I understand then, you want to display an image according the layout right?
@alimtunc I'm not sure I understand then, you want to display an image according the layout right?
I want to display the correct letter on the direction step
The easy fix could be to only display the arrows and let "advanced" users (i.e. people who played games in their life) realize that WASD / ZQSD also triggers the arrows. :)
@Donorhan @ramnes all is good
Thanks you!
Handle other layout keyboards, there is only one thing left. Determine if it's Qwerty or Azerty.. I've tried to use something like this https://stackoverflow.com/a/59113178 or directly using hotkeys.trigger() and determine is keyCode. But none of them worked. Is there any solution to determine the layout of a keyboard actually @Donorhan ?