diff --git a/src/model/Hotkey.java b/src/model/Hotkey.java new file mode 100644 index 0000000000000000000000000000000000000000..563b82f5be551c4f287e18f65f41786e08109a5a --- /dev/null +++ b/src/model/Hotkey.java @@ -0,0 +1,53 @@ +package model; + +import java.io.Serializable; + +public class Hotkey { + /** + * Virtual keycode of the hotkey. + */ + protected final int keyCode; + + /** + * Unique ID of the hotkey. + */ + protected final int id; + + /** + * Modifier for the hotkey. + */ + protected final Modifier modifier; + + /** + * Constructs an immutable hotkey. + * @param keyCode The virtual keycode of the hotkey. + * @param id The unique ID of the hotkey. + * @param modifier The modifier of the hotkey. + */ + public Hotkey(int keyCode, int id, Modifier modifier) { + this.keyCode = keyCode; + this.id = id; + this.modifier = modifier; + } + + /** + * Gets the Hotkeys virtual keyCode. + */ + public int getKeyCode() { + return keyCode; + } + + /** + * Gets the hotkey's unique ID. + */ + public int getID() { + return id; + } + + /** + * Get's the hotkey's modifier. + */ + public Modifier getModifier() { + return modifier; + } +}