Skip to content
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

Update simple example to add scancode #61

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

zenitsuy
Copy link
Contributor

Hello I tried compiling the Basic example today and it did not compile with the current version of the header anymore, so i added the scancode so it would compile as expected again.
Thanks a lot for the great graphics library

Basic example did not compile with the current version of the header anymore
@ColleagueRiley
Copy link
Owner

ColleagueRiley commented Dec 29, 2024

@zenitsuy Thank you for making this PR, I forgot to change this after the write.

This is technically a windowing library, not a graphics library and I'm happy it's helping you! :)

This change is incorrect, I'm not 100% sure if you're confused because of some other incorrect part of RGFW. Let me know if that's the case.

u32 keycode, u32 scancode is backwards, it should be u32 scancode, u32 keycode

However, I'd prefer you use

u32 key, u32 keyChar or u32 physicalKey, u32 mappedKey

The scancode is the "physicalKey", which means it refers to where the key is on the keyboard, rather than the actual mapping by the OS. "mappedKey" or "keycode" refers to which key it is according to the OS's mapping.

I wrote about that on the keycode rewrite PR if you want more information.

changed u32 keycode, u32 scancode to u32 key, u32 keyChar
@zenitsuy
Copy link
Contributor Author

Hello, thanks I didn't see that in the keycode rewrite before, so I just messed up with the order of the physical and the mapped key. Thanks for the answer and that great overview in the keycode rewrite.

@ColleagueRiley ColleagueRiley merged commit d95eef5 into ColleagueRiley:main Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants