by IainPeregrine
A small library for handling player key presses. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://IainPeregrine.key_state##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 0.1
Date added: Jan 29 2011
Last updated: Feb 21 2018
2 fans
Key_State version 0.1
Released January 31th, 2011.

Defines several procs, verbs, and vars on the client for use in registering and ckecking player key presses and held keys.

Key_State is a small library which allows you to get answers to two questions that are important in gaming:
* Has the player pressed a key?
* Is the Player holding down a key?

DM uses an event based environment where code is tied directly to player commands, called
"verbs". In games with different environments, especially those with "game loops", the default event based player command system is a major obstacle. This library provides a way to passively log player commands, so that the game can actively respond on its own terms and at its own time.

This library is still in Beta, and will be subject to change. Until a '1.0' version is released, updates will probably not be backwards compatible.