ft2_keyboard.h (588B)
1 #pragma once 2 3 #include <stdint.h> 4 #include <stdbool.h> 5 #include <SDL2/SDL.h> 6 7 typedef struct keyb_t 8 { 9 uint8_t keyRepeat, keyPressed; 10 bool ignoreCurrKeyUp, ignoreTextEditKey, numPadPlusPressed; 11 bool keyModifierDown, leftCommandPressed, leftWinKeyDown; 12 bool leftShiftPressed, leftCtrlPressed, leftAltPressed; 13 } keyb_t; 14 15 extern keyb_t keyb; // ft2_keyboard.c 16 17 int8_t scancodeKeyToNote(SDL_Scancode scancode); 18 void keyUpHandler(SDL_Scancode scancode, SDL_Keycode keycode); 19 void keyDownHandler(SDL_Scancode scancode, SDL_Keycode keycode, bool keyWasRepeated); 20 void readKeyModifiers(void);