std_keyboard.zh#
Variables#
const int |
|
const int |
|
const int |
|
const int |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const char32 |
|
const int |
|
const int |
Functions#
char32 |
CheckKeyToChar(int key) |
bool |
ReadKey(int key) |
bool |
KeyPress(int key) |
char32 |
GetKeyPress(int key) |
bool |
|
bool |
|
bool |
PressAlt() |
bool |
CapsLock() |
bool |
NumLock() |
bool |
|
bool |
PressWin() |
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
AccentShift(int n) |
bool |
|
bool |
|
bool |
FKey(int f) |
bool |
EscKey() |
char32 |
KeyToChar(int key) |
char32 |
KeyToChar(int key, bool shifted) |
char32 |
KeyToChar(int key, bool shifted, bool caps) |
Variable descriptions#
const int KEYBOARD_TYPE = 0
🔗 Source
0 == US, 1 == UK, 2 == EU/GR
const int KEYBOARD_LAYOUT_US = 0
🔗 Source
const int KEYBOARD_LAYOUT_UK = 1
🔗 Source
const int KEYBOARD_LAYOUT_EU = 2
🔗 Source
const char32 CHAR_ERROR = -1
🔗 Source
Special Circumstance Characters to store in strings if needed.
const char32 CHAR_BACKSPC = -2
🔗 Source
const char32 CHAR_DELETE = -4
🔗 Source
const char32 CHAR_HOMEKEY = -8
🔗 Source
const char32 CHAR_ENDKEY = -16
🔗 Source
const char32 CHAR_PAGEUP = -32
🔗 Source
const char32 CHAR_PAGEDOWN = -64
🔗 Source
const char32 CHAR_ARROW_U = -128
🔗 Source
const char32 CHAR_ARROW_L = -256
🔗 Source
const char32 CHAR_ARROW_D = -512
🔗 Source
const char32 CHAR_ARROW_R = -1024
🔗 Source
const char32 CHAR_PRINTSCREEN = -2048
🔗 Source
const char32 CHAR_PAUSE = -4096
🔗 Source
const char32 CHAR_NONE = 0
🔗 Source
const int ___KEY_TIMER = 255
🔗 Source
Index of ____STD_GRAM[]
const int KEYBOARD_REPEAT_RATE = 6
🔗 Source
frames per keypress. 3 == 1/20 second
Function descriptions#
char32 CheckKeyToChar(int key) 🔗 Source
const int SFX_KEYPRESS = 58; //Do we want this in the header? Checks if a key was pressed. If it was, it returns its char value. Returns CHAR_NONE / false if key was not pressed.
bool ReadKey(int key) 🔗 Source
These functions are meant to return ReadKey and Keypress, while setting the appropriate input blockers. I would like to add bool Input->ReadingKeyboard, which while true, stops key presses from being read as joystick inputs.
This should be a ZScript function, as Input->ReadKey() -Z
bool KeyPress(int key) 🔗 Source
char32 GetKeyPress(int key) 🔗 Source
Is this safe? Should we return 0, which is null? Returns modifier keys
bool PressControl() 🔗 Source
bool PressRightWin() 🔗 Source
bool PressLeftWin() 🔗 Source
bool PressCommand() 🔗 Source
bool InAltSequence() 🔗 Source
bool AccentShift(int n) 🔗 Source
Is this Linux only?
Input->DisableKey[] can be used to disable F keys, aside from F7,F8,F9.
char32 KeyToChar(int key) 🔗 Source
converts a key to its proper char (int, in ZScript).
char32 KeyToChar(int key, bool shifted) 🔗 Source
bool caps ==true : caps acts as shift, == false, standard
char32 KeyToChar(int key, bool shifted, bool caps) 🔗 Source