04-04-2023, 02:25 AM
(04-03-2023, 11:07 PM)dbox Wrote:(04-03-2023, 08:40 PM)TerryRitchie Wrote: I found a library called:
' GX - A BASIC Game Engine for QB64
' 2021 boxgaming - https://github.com/boxgaming/gx
that had mapped all the _BUTTON vales to keys in a file called gx.bi. I used that as a basis to create the code below if anyone needs the _BUTTON values for the keyboard.
Yes, that was an interesting exercise. I wanted to have generic and consistent device detection and input mapping across different types of game device inputs (gamepad, keyboard, mouse) using _DEVICEINPUT. I also found that _DEVICEINPUT didn't work for keyboard button state on macos so GX has a fallback for that OS to use _keydown.
That information was very helpful. Thank you.