After getting the demo for Thy Sword ready and the Greenlight campaign for it started I relaxed a little by making an on screen keyboard that should be usable on all devices (Android, IOS etc.). I have tested it on two Android devices and my Windows PC. The keyboard can be placed anywhere in a room without the need for modification.
The keyboard can be fully customized to your needs, everything should be documented in the create event of the obj_onscreen_keyboard object. If you end up using it in your game, I would love to hear about it. 🙂
- The keyboard manipulates the keyboard_string variable directly so it can be used in parallell with a physical keyboard.
- Keys are completely configurable (number of rows, keys per row, x offset for each row, key characters etc.).
- The space between keys can be configured.
- Shift key support, meaning all keys can have two characters assigned to them.
- Keys can be of different widths (width and height of keys is taken from the sprites, the sprites need two images, the second one is for pressed state).
- Sound and/or haptic effect on key press.
- Key repeat function (delays can be configured).
- Auto-shift function (enable shift for one character after interpunction).
- Shift once function (disable shift after one key press).
The project can be downloaded below. There is actually only one object needed for the keyboard and a few sprites for the keys. The object named obj_show_keyboard_string is only used for drawing the keyboard_string variable. The project was made using GM:S v1.4.1567. There is a newer version of the keyboard on the YoYo Games Marketplace: