Class: KeyboardCommandsTargeted
keyboard/KeyboardCommandsTargeted.KeyboardCommandsTargeted
Defines a set of commands which are designed to work together for designing a keyboard interface. The commands set highlights and allow you to perform actions on highlighted targets.
Constructors
constructor
• new KeyboardCommandsTargeted(graph)
Parameters
| Name | Type |
|---|---|
graph | Graph |
Defined in
keyboard/KeyboardCommandsTargeted.ts:46
Methods
clearTarget
▸ clearTarget(): Thenable<unknown>
Unsets the current target, causing any highlights to disappear
Returns
Thenable<unknown>
A promise that resolves to the result of the cursorless command
Defined in
keyboard/KeyboardCommandsTargeted.ts:266
highlightTarget
▸ Private highlightTarget(): Thenable<unknown>
Returns
Thenable<unknown>
Defined in
keyboard/KeyboardCommandsTargeted.ts:185
init
▸ init(): void
Returns
void
Defined in
keyboard/KeyboardCommandsTargeted.ts:54
performActionOnTarget
▸ performActionOnTarget(action): Promise<unknown>
Performs action action on the current target
Parameters
| Name | Type | Description |
|---|---|---|
action | ActionType | The action to run |
Returns
Promise<unknown>
A promise that resolves to the result of the cursorless command
Defined in
keyboard/KeyboardCommandsTargeted.ts:205
targetDecoratedMark
▸ targetDecoratedMark(param0): Promise<unknown>
Sets the highlighted target to the given decorated mark. If {@link character} is omitted, then we wait for the user to press a character
Parameters
| Name | Type | Description |
|---|---|---|
param0 | TargetDecoratedMarkArgument | Describes the desired targeted mark |
Returns
Promise<unknown>
A promise that resolves to the result of the cursorless command
Defined in
keyboard/KeyboardCommandsTargeted.ts:85
targetScopeType
▸ targetScopeType(param0): Promise<unknown>
Expands the current target to the containing scopeType
Parameters
| Name | Type | Description |
|---|---|---|
param0 | TargetScopeTypeArgument | Describes the desired scope type |
Returns
Promise<unknown>
A promise that resolves to the result of the cursorless command
Defined in
keyboard/KeyboardCommandsTargeted.ts:159
targetSelection
▸ targetSelection(): Thenable<unknown>
Sets the current target to the current selection
Returns
Thenable<unknown>
A promise that resolves to the result of the cursorless command
Defined in
keyboard/KeyboardCommandsTargeted.ts:247