Skip to content

[Sdl] add keycode, keymod and scancode constants#827

Open
zagortenej wants to merge 1 commit intoHaxeFoundation:masterfrom
zagortenej:add-more-sdl-constants
Open

[Sdl] add keycode, keymod and scancode constants#827
zagortenej wants to merge 1 commit intoHaxeFoundation:masterfrom
zagortenej:add-more-sdl-constants

Conversation

@zagortenej
Copy link

This PR adds following SDL enums as Haxe constants:

The KeyCode and Keymod constants source code is generated from a C program using code lines like this one:

  printf("  var KMOD_CTRL = %d;\n", KMOD_CTRL);

which ensures that numerical values in the Haxe source are actual C macro values.

The Scancode source is generated by simple find/replace operation, since all enums in SDL source have literal numerical values.

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.

1 participant