org.sikuli.hotkey.HotkeyCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sikulixapi Show documentation
Show all versions of sikulixapi Show documentation
... for visual testing and automation
/*
* Copyright (c) 2010-2019, sikuli.org, sikulix.com - MIT license
*/
package org.sikuli.hotkey;
public abstract class HotkeyCallback {
/**
* Override this to implement your own hotkey handler.
*
* @param e HotkeyEvent
*/
abstract public void hotkeyPressed(HotkeyEvent e);
/**
* INTERNAL USE: system specific handler implementation
*
* @param e HotkeyEvent
*/
public void invokeHotkeyPressed(final HotkeyEvent e) {
Thread hotkeyThread = new Thread() {
@Override
public void run() {
hotkeyPressed(e);
}
};
hotkeyThread.start();
}
}