Home Reference Source
import KeyMatcher from 'keasy/src/keymatcher.js'
public class | source

KeyMatcher

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

match(keyString: String): KeyMatcher

Sets a {String} of keys this instance of KeyMatcher should match for calls to KeyMatcher.withEvent.

public

Matches the keys passed to KeyMatcher.match with the passed KeyBoardEvent.

Public Constructors

public constructor() source

Public Methods

public match(keyString: String): KeyMatcher source

Sets a {String} of keys this instance of KeyMatcher should match for calls to KeyMatcher.withEvent.

Params:

NameTypeAttributeDescription
keyString String

A String of the form "keyX+keyY+...+KeyN".

Return:

KeyMatcher

public withEvent(event: KeyBoardEvent): boolean source

Matches the keys passed to KeyMatcher.match with the passed KeyBoardEvent.

Params:

NameTypeAttributeDescription
event KeyBoardEvent

A KeyBoardEvent the keys passed to KeyMatcher.match will be matched with.

Return:

boolean