function OnKeyboard(char) ... end function
This is an event function you can overload to perform some actions when a keyboard button is pressed. This event is fired when either a button on physical keyboard or a virtual button on an on-screen keyboard is pressed. Example:
function OnKeyboard(char) ClearScreen() SetFontSize(50) DrawText(100, 100, char) end functionIf a non-character keyboard button is pressed, the function parameter can have one of the following values:
function OnKeyboard(char) ClearScreen() SetFontSize(50) if char = "VK_ENTER" DrawText(100, 100, "Enter Pressed") end if end function
See also: