Keyboard

by Forum_account
A library for handling keyboard input.
ID:1147337
 
client
proc/has_key(k)
if(istype(keys))
return keys[k]

This proc returns the state of k.
The istype() check is necessary because I've experienced a "bad index" runtime error from trying to access client.keys while it was still a text string. It just checks if client.keys is a list before trying to read it.

It would also serve useful for the Pixel Movement and Sidescroller libraries, which rely on this. I've also experienced the runtime error in those libraries.