textmode.js / Textmodifier / isKeyPressed
Method: isKeyPressed()
ts
isKeyPressed(key): boolean;Check whether a key is currently pressed.
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string | The key to check (e.g., 'a', 'Enter', 'ArrowLeft') |
Returns
boolean
true when the key is currently pressed.