-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcore] KeyboardKey only supports American keyboard #4019
Comments
I can agree. |
I think this is behavior intended. See #2822 |
@PizzaGame01 I'm afraid there is not an easy solution to this problem, the keyboard mapping should be managed at GLFW, that raylib uses or at user side. Do you know of another possible solution? |
If anyone finds this issue and knows of a simple multi-platform solution to address it, please, comment |
has SDL 2 the same problem? |
The problem statement in this issue is flawed, that is why there is confusion. The keyboard key (KEY_) enum is not the keyname, it's the physical keycode. That enum was named after the American layout, because the enum has to be named something. The enum can not and should not change based on keyboard layout. it represents physical buttons. There should be an API where the user can ask "What is the name of KEY_W", and on dvorak it would return ',', or whatever the characater code is for the keyboard mapping. GLFW exposes this via glfwGetKeyName, and I'm sure that other platforms do as well. We should add a This will solve the core issue and provide access to all 3 levels of keyboard info for keys
|
@raysan5 can you may reopen it? |
I'm using a Europe (German) keyboard.
Its happend in Raylib-cs, but becaus its a port of Raylib i think this problem is still in original Raylib.
If i do this:
Its happen nothing by pressing Z, but if i press Y the if statement is executing.
This problem is also by
int key = Raylib.GetKeyPressed();
Clicked: Y
Output: Z
The text was updated successfully, but these errors were encountered: