Package org.sikuli.basics
Class HotkeyManager
- java.lang.Object
-
- org.sikuli.basics.HotkeyManager
-
- Direct Known Subclasses:
GenericHotkeyManager,LinuxHotkeyManager
public abstract class HotkeyManager extends Object
Singleton class to bind hotkeys to hotkey listeners
-
-
Constructor Summary
Constructors Constructor Description HotkeyManager()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean_addHotkey(int keyCode, int modifiers, HotkeyListener callback)abstract int_removeAll(Map<String,Integer[]> hotkeys, boolean isTerminating)abstract boolean_removeHotkey(int keyCode, int modifiers)booleanaddHotkey(char key, int modifiers, HotkeyListener callback)install a hotkey listener.booleanaddHotkey(String key, int modifiers, HotkeyListener callback)install a hotkey listener.booleanaddHotkey(String hotkeyType, HotkeyListener callback)install a hotkey listener for a global hotkey (capture, abort, ...)abstract voidcleanUp()StringgetHotKeyText(String hotkeyType)static HotkeyManagergetInstance()booleanremoveHotkey(char key, int modifiers)remove a hotkey and uninstall a hotkey listener.booleanremoveHotkey(String hotkeyType)remove a hotkey by type (not supported yet)booleanremoveHotkey(String key, int modifiers)uninstall a hotkey listener.static voidreset(boolean isTerminating)
-
-
-
Method Detail
-
getInstance
public static HotkeyManager getInstance()
-
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 stringcallback- HotkeyListener- Returns:
- success
-
addHotkey
public boolean addHotkey(char key, int modifiers, HotkeyListener callback)install a hotkey listener.- Parameters:
key- key character (class Key)modifiers- modifiers flagcallback- 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 flagcallback- 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)
-
-