You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
401 B
22 lines
401 B
10 years ago
|
package mightypork.rogue.input;
|
||
|
|
||
|
|
||
|
public interface KeyBinder {
|
||
|
|
||
|
/**
|
||
|
* Bind handler to a keystroke, replace current handler if any
|
||
|
*
|
||
|
* @param stroke trigger keystroke
|
||
|
* @param task handler
|
||
|
*/
|
||
|
abstract void bindKeyStroke(KeyStroke stroke, Runnable task);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Remove handler from a keystroke (id any)
|
||
|
* @param stroke stroke
|
||
|
*/
|
||
|
abstract void unbindKeyStroke(KeyStroke stroke);
|
||
|
|
||
|
}
|