public class KeyboardShortcutsService extends Object implements KeyboardShortcutsApi
KeyboardShortcutsApi implementation used when envelope API is availableKeyboardShortcutsApi.Action| Constructor and Description |
|---|
KeyboardShortcutsService() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(int id)
Deregister a Keyboard Shortcut.
|
int |
registerKeyDownThenUp(String combination,
String label,
KeyboardShortcutsApi.Action onKeyDown,
KeyboardShortcutsApi.Action onKeyUp,
KeyboardShortcutsApiOpts opts)
Register a Keyboard Shortcuts for a keypress event.
|
int |
registerKeyPress(String combination,
String label,
KeyboardShortcutsApi.Action onKeyDown,
KeyboardShortcutsApiOpts opts)
Register a Keyboard Shortcuts for a keypress event.
|
public int registerKeyPress(String combination, String label, KeyboardShortcutsApi.Action onKeyDown, KeyboardShortcutsApiOpts opts)
KeyboardShortcutsApiregisterKeyPress in interface KeyboardShortcutsApicombination - The combination of keys that trigger 'onKeyDown' action. This is shown on the Keyboard Shortcuts panel.label - The label for this Keyboard Shortcut. This is shown on the Keyboard Shortcuts panel. Use a `|` character to separate its section from its description. (e.g. "Moving | Arrow up")onKeyDown - The action to be executed when 'combination' is pressed.opts - Options of this registration.public int registerKeyDownThenUp(String combination, String label, KeyboardShortcutsApi.Action onKeyDown, KeyboardShortcutsApi.Action onKeyUp, KeyboardShortcutsApiOpts opts)
KeyboardShortcutsApiregisterKeyDownThenUp in interface KeyboardShortcutsApicombination - The combination of keys that trigger 'onKeyDown' action when they're pressed and 'onKeyUp' when they're released. This is shown on the Keyboard Shortcuts panel.label - The label for this Keyboard Shortcut. This is shown on the Keyboard Shortcuts panel. Use a `|` character to separate its section from its description. (e.g. "Moving | Arrow up")onKeyDown - The action to be executed when 'combination' is pressed.onKeyUp - The action to be executed when 'combination' is released.opts - Options of this registration.public void deregister(int id)
KeyboardShortcutsApideregister in interface KeyboardShortcutsApiid - The id obtained when registering a Keyboard Shortcut.Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.