Skip to content
Benedict Allen edited this page Nov 15, 2015 · 3 revisions

KeyboardEvent Class

The KeyboardEvent is used to pass key (up and down) events to Sheets.

Extends Event

Constructor

Event creation is handled internally by Application.

KeyboardEvent( Event enum event, string key, table held )

Properties

key

KeyboardEvent.key - string

The key of the event.

Methods

matches()

boolean matches = KeyboardEvent:matches( string keycombo )

Returns whether the event matches the key combination given.

isHeld()

boolean held = KeyboardEvent:isHeld( string key )

Returns whether key was held at the time the event was fired.

Key Combinations

Key combinations should be formatted as such: "key1-key2-key3". In order for it to match, the keys must have been pressed in that order. To get around this, you can use isHeld() to check each modifier individually.

Clone this wiki locally