On Screen Keyboard for Gamemaker Studio

onscreen-keyboard

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. ­čÖé

Features

  • 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).

Download

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:
https://marketplace.yoyogames.com/assets/5024/on-screen-keyboard

Download “On Screen Keyboard” OnScreenKeyboardv10.gmx.zip – Downloaded 694 times – 1 MB

2 thoughts on “On Screen Keyboard for Gamemaker Studio

  1. This looks like exactly what I need for a game I am building into an arcade cabinet with my students. (I can’t check right now as our version of GM is out of date here on my school computer so I can’t load it but will try it out on one of my personal laptops soon…)

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.