Skip to content

FKeyBind.KeyTracker ​

com.jsmacrosce.jsmacros.client.api.library.impl.FKeyBind.KeyTracker

Tracks key names marked pressed by JsMacros key and keybind state calls; it does not query physical keyboard state. Direct calls update only this ledger and do not synthesize input.

js
Chat.log(ScriptClasses.KeyTracker.getPressedKeys());

Available in scripts as ScriptClasses.KeyTracker.

Nested type declared in KeyBind; not a separate global library.

Constructors ​

new FKeyBind.KeyTracker ​

new FKeyBind.KeyTracker()#

Methods ​

getPressedKeys ​

static getPressedKeys(): Set<String>#
Returns an immutable snapshot of tracked pressed key names.
Returns: immutable snapshot of tracked pressed key names

press ​

static press(InputConstants.Key key): void#
Records the raw key's name in the tracked pressed-name set. A null name is ignored.

Parameters:

  • key: the raw key whose name to record
static press(KeyMapping bind): void#
Records the key mapping's current serialized key name in the tracked pressed-name set. A null name is ignored.

Parameters:

  • bind: the key mapping whose current assigned key name to record

unpress ​

static unpress(InputConstants.Key key): void#
Removes the raw key's name from the tracked pressed-name set. A null name is ignored.

Parameters:

  • key: the raw key whose name to remove
static unpress(KeyMapping bind): void#
Removes the key mapping's current serialized key name from the tracked pressed-name set. A null name is ignored.

Parameters:

  • bind: the key mapping whose current assigned key name to remove