Mouse And Keyboard Action Library

Mouse And Keyboard Action Library

The Mouse and Keyboard action library is where you can find the actions required to poll and process input from the keyboard or mouse devices. The available actions are all listed below:

Mouse Pressed IconIf Mouse Pressed
Mouse Down IconIf Mouse Down
Mouse Released IconIf Mouse Released
Keyboard Pressed IconIf Key Pressed
Keyboard Down IconIf Key Down
Keyboard Released IconIf Key Released

 

 

 

 

 

 

 

 

 

The rest of the actions here refer to the virtual keyboard. If you require text or numeric input in your game on a touchscreen device, then you can use the virtual keyboard actions provided to use the device OS keyboard. These actions will call up or hide the OS keyboard and accept input from it just the same as a physical keyboard, so the regular GameMaker keyboard actions should all work with virtual keyboards (for example, the "If Key Released" action), and any input from the virtual keyboard will be stored in the different keyboard variables, like keyboard_string or keyboard_last_char, etc...).

Opening or closing the virtual keyboard will generate System Asynchronous Events, in which the async_load DS map will be populated with the following key/value pairs:

The available virtual keyboard actions are:

Show Virtual Keyboard IconShow Virtual Keyboard
Hide Virtual Keyboard IconHide Virtual Keyboard
Get Virtual Keyboard Height IconGet Virtual Keyboard Height
If Virtual Keyboard Is Showing IconIf Virtual Keyboard Showing