Home > @rainway/web > HeldKeys
HeldKeys class
An interface for querying which keyboard keys are currently held down (locally, on the web page).
Signature:
export declare class HeldKeys
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
alt | readonly | boolean | Reports whether either Alt key is pressed. |
ctrl | readonly | boolean | Reports whether either Ctrl key is pressed. |
keys | readonly | ReadonlySet<VirtualKey> | Returns all held keys as a ReadonlySet . |
shift | readonly | boolean | Reports whether either Shift key is pressed. |
win | readonly | boolean | Reports whether either Windows/Meta key is pressed. |
Methods
Method | Modifiers | Description |
---|---|---|
has(key) | Reports whether the given VirtualKey is pressed. |