summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events
diff options
context:
space:
mode:
Diffstat (limited to 'StardewModdingAPI/Events')
-rw-r--r--StardewModdingAPI/Events/Controls.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/StardewModdingAPI/Events/Controls.cs b/StardewModdingAPI/Events/Controls.cs
index ace890ca..8cf0f431 100644
--- a/StardewModdingAPI/Events/Controls.cs
+++ b/StardewModdingAPI/Events/Controls.cs
@@ -11,6 +11,7 @@ namespace StardewModdingAPI.Events
{
public static event EventHandler<EventArgsKeyboardStateChanged> KeyboardChanged = delegate { };
public static event EventHandler<EventArgsKeyPressed> KeyPressed = delegate { };
+ public static event EventHandler<EventArgsKeyPressed> KeyReleased = delegate { };
public static event EventHandler<EventArgsMouseStateChanged> MouseChanged = delegate { };
public static void InvokeKeyboardChanged(KeyboardState priorState, KeyboardState newState)
@@ -27,5 +28,10 @@ namespace StardewModdingAPI.Events
{
KeyPressed.Invoke(null, new EventArgsKeyPressed(key));
}
+
+ public static void InvokeKeyReleased(Keys key)
+ {
+ KeyReleased.Invoke(null, new EventArgsKeyPressed(key));
+ }
}
}