Class HotkeyManager

    • Constructor Detail

      • HotkeyManager

        public HotkeyManager()
    • Method Detail

      • reset

        public static void reset​(boolean isTerminating)
      • cleanUp

        public abstract void cleanUp()
      • addHotkey

        public boolean addHotkey​(String hotkeyType,
                                 HotkeyListener callback)
        install a hotkey listener for a global hotkey (capture, abort, ...)
        Parameters:
        hotkeyType - a type string
        callback - HotkeyListener
        Returns:
        success
      • getHotKeyText

        public String getHotKeyText​(String hotkeyType)
      • addHotkey

        public boolean addHotkey​(char key,
                                 int modifiers,
                                 HotkeyListener callback)
        install a hotkey listener.
        Parameters:
        key - key character (class Key)
        modifiers - modifiers flag
        callback - HotkeyListener
        Returns:
        true if success. false otherwise.
      • addHotkey

        public boolean addHotkey​(String key,
                                 int modifiers,
                                 HotkeyListener callback)
        install a hotkey listener.
        Parameters:
        key - key character (class Key)
        modifiers - modifiers flag
        callback - HotkeyListener
        Returns:
        true if success. false otherwise.
      • removeHotkey

        public boolean removeHotkey​(String hotkeyType)
        remove a hotkey by type (not supported yet)
        Parameters:
        hotkeyType - capture, abort, ...
        Returns:
        success
      • removeHotkey

        public boolean removeHotkey​(char key,
                                    int modifiers)
        remove a hotkey and uninstall a hotkey listener.
        Parameters:
        key - key character (class Key)
        modifiers - modifiers flag
        Returns:
        true if success. false otherwise.
      • removeHotkey

        public boolean removeHotkey​(String key,
                                    int modifiers)
        uninstall a hotkey listener.
        Parameters:
        key - key string (class Key)
        modifiers - modifiers flag
        Returns:
        true if success. false otherwise.
      • _addHotkey

        public abstract boolean _addHotkey​(int keyCode,
                                           int modifiers,
                                           HotkeyListener callback)
      • _removeHotkey

        public abstract boolean _removeHotkey​(int keyCode,
                                              int modifiers)
      • _removeAll

        public abstract int _removeAll​(Map<String,​Integer[]> hotkeys,
                                       boolean isTerminating)