Interface KeycodeRegistry
-
public interface KeycodeRegistry
Key code registry let's modules register key codes and returns the actual keys configured by the user
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
check(String qualifier, int code, int modifiers)
Checks whether the key code and modifiers (ctrl, alt, ...) match to a certain registration.List<KeycodeRegistration>
get(int code)
Returns the current registered key code registration by codeKeycodeRegistration
get(String qualifier)
Returns the current registered key code registration by qualifierCollection<KeycodeRegistration>
getAll()
Returns all key code registrationsvoid
register(KeycodeRegistration... keycodeRegistrations)
Updates the key configured for key registrations - usually used by options menu for the user to change keysvoid
registerDefault(KeycodeRegistration... keycodeRegistrations)
Registers key code registrations also containing the default key - usually used by modules making use of these key pressesvoid
unregister(String... qualifiers)
Unregisters key code registrations
-
-
-
Method Detail
-
register
void register(KeycodeRegistration... keycodeRegistrations)
Updates the key configured for key registrations - usually used by options menu for the user to change keys
-
registerDefault
void registerDefault(KeycodeRegistration... keycodeRegistrations)
Registers key code registrations also containing the default key - usually used by modules making use of these key presses
-
unregister
void unregister(String... qualifiers)
Unregisters key code registrations
-
get
KeycodeRegistration get(String qualifier)
Returns the current registered key code registration by qualifier
-
get
List<KeycodeRegistration> get(int code)
Returns the current registered key code registration by code
-
getAll
Collection<KeycodeRegistration> getAll()
Returns all key code registrations
-
check
boolean check(String qualifier, int code, int modifiers)
Checks whether the key code and modifiers (ctrl, alt, ...) match to a certain registration. This method is used by modules in key event handlers to check whether their key was pressed
-
-