device_is_keypad_open

Checks the device to see if a keypad is open or not.

Syntax:

device_is_keypad_open


Returns: Boolean


Description

This does a check of the device for a keypad and if one is available it returns true otherwise it returns false. Please note that this function is mainly for use with Android devices.

For those users with a Sony Xperia Play, there is a set button/key map setup within GameMaker: Studio, so you can use the keyboard constants vk_up, vk_down, vk_left, vk_right for the joypad keys and Triangle is ord('T'), Square is ord('S'), Circle is vk_alt + vk_backspace while the back button is simply vk_backspace, Cross is vk_space, Select is vk_return and Start is vk_rshift, the L Trigger is ord('L') and R Trigger is ord('R').


Example:

if device_is_keypad_open()
   {
   global.Setting = 2;
   }
else
   {
   global.Setting = 1;
   }

The above code checks for a keypad then changes a global variable depending on the returned value.


Back: Device Input
Next: device_get_tilt_x
© Copyright YoYo Games Ltd. 2018 All Rights Reserved