diff --git a/Dalamud/Game/ClientState/Keys/KeyState.cs b/Dalamud/Game/ClientState/Keys/KeyState.cs
index 65d949ed8..0c8956006 100644
--- a/Dalamud/Game/ClientState/Keys/KeyState.cs
+++ b/Dalamud/Game/ClientState/Keys/KeyState.cs
@@ -52,6 +52,7 @@ namespace Dalamud.Game.ClientState.Keys
/// The virtual key to change.
/// Whether the specified key is currently pressed.
/// If the vkCode is not valid. Refer to or .
+ /// If the set value is non-zero.
public unsafe bool this[int vkCode]
{
get => this.GetRawValue(vkCode) != 0;
@@ -84,8 +85,14 @@ namespace Dalamud.Game.ClientState.Keys
/// The virtual key to change.
/// The raw value to set in the index array.
/// If the vkCode is not valid. Refer to or .
+ /// If the set value is non-zero.
public void SetRawValue(int vkCode, int value)
- => this.GetRefValue(vkCode) = value;
+ {
+ if (value != 0)
+ throw new ArgumentOutOfRangeException(nameof(value), "Dalamud does not support pressing keys, only preventing them via zero or False. If you have a valid use-case for this, please contact the dev team.");
+
+ this.GetRefValue(vkCode) = value;
+ }
///
public void SetRawValue(VirtualKey vkCode, int value)