Main Menu

Keys API and constants

Started by Luca_S, Apr 24, 2019, 05:47 PM

Previous topic - Next topic

Luca_S

I'm not quite sure how the keys API should be documented.

While the Keys API itself definitely needs a page the question is what to do about all the keys constants. The constants template would get cluttered with all the keys constant and we would get more than 100 pages just containing something like "keys.a is the keycode of the a key" if each constant did get its own page.

What is your opinion on this?

Lupus590

Could you summerise the alpha-numeric keys as appearing in the API as they are displayed on the screen/keyboard?

That way you just have to document the other ones.

Lignum

I think the table seen here should serve as inspiration. Have header columns be the least significant digit of the scancode, and the rows the rest of the digits.

Additionally, it's worth mentioning that these scancodes are the same ones used by LWJGL 2.

QuickMuffin8782

#3
Quote from: Lignum on Apr 25, 2019, 07:25 PM-snip-
I know this was posted a long time ago, but to add, here is a image showing the keys on the keyboard, it should help you with getting the keys mastered with lua.

PS: 216 is the Command/Windows Key
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782