Why are KEY_* constants not used in the DRM backend? #5106
matthijskooijman
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@matthijskooijman I think it was because it could confuse developers with the mapping and also for consistency. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looking over the code, I noticed a lot of keycode literals, for example:
raylib/src/platforms/rcore_drm.c
Lines 176 to 182 in 852c513
and
raylib/src/platforms/rcore_drm.c
Lines 1512 to 1515 in 852c513
These values have
KEY_*
constants in raylib.h:raylib/src/raylib.h
Lines 579 to 584 in 852c513
In some places, the constant names are used in comments, but why are they not just used in place of the literals? That would make the code a lot more readable and maintainable, I would say?
Beta Was this translation helpful? Give feedback.
All reactions