From d2724ab61272a715ff9ef23ecbcb4700a39b0f8a Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Thu, 6 Sep 2018 01:00:34 +0000 Subject: [PATCH] scott created page: JoeyLib Keyboard Functions --- JoeyLib-Keyboard-Functions.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 JoeyLib-Keyboard-Functions.md diff --git a/JoeyLib-Keyboard-Functions.md b/JoeyLib-Keyboard-Functions.md new file mode 100644 index 0000000..81ee11f --- /dev/null +++ b/JoeyLib-Keyboard-Functions.md @@ -0,0 +1,19 @@ +*Keyboard input is currently very basic. There is no support for multiple simultaneous keys to be pressed at this time.* + +#### jlKeyPressed +```c +bool jlKeyPressed(void); +``` +Returns `true` if a key is currently being pressed. + +#### +```c +char jlKeyRead(void); +``` +Returns the ASCII value of the last key pressed. If the user presses and releases a key, the value will remain available until cleared by `jlKeyRead`. Key presses are not buffered. If the user presses and releases more than one key before you read it, you will only get the last one pressed. Only common ASCII values are supported. Special keys are filtered out. + +#### +```c +void jlKeyWaitForAny(void); +``` +A convenience function. Just waits for any key to be pressed and released. \ No newline at end of file