diff --git a/NohBoard/Extra/GlobalSettings.cs b/NohBoard/Extra/GlobalSettings.cs
index 6640d06..010401f 100644
--- a/NohBoard/Extra/GlobalSettings.cs
+++ b/NohBoard/Extra/GlobalSettings.cs
@@ -30,6 +30,11 @@ namespace ThoNohT.NohBoard.Extra
[DataContract(Name = "GlobalSettings", Namespace = "")]
public partial class GlobalSettings
{
+ ///
+ /// Field for .
+ ///
+ private int? updateInterval;
+
///
/// Indicates whether there were changes made to the definition since the last save or load action.
/// Changes are tracked when undo history is pushed, and reset when a keyboard is loaded or saved.
@@ -106,6 +111,17 @@ public partial class GlobalSettings
[DataMember]
public int PressHold { get; set; }
+ ///
+ /// The time in milliseconds between which the keyboard is updated and rendered again.
+ /// Minimum: 5ms (200fps), maximum: 60s, default: 33ms (30fps).
+ ///
+ [DataMember]
+ public int UpdateInterval
+ {
+ get => this.updateInterval ?? 33;
+ set => this.updateInterval = Math.Max(5, Math.Min(60000, value));
+ }
+
#endregion Input
#region Trapping
diff --git a/NohBoard/Forms/MainForm.cs b/NohBoard/Forms/MainForm.cs
index 03661d4..727b5d8 100644
--- a/NohBoard/Forms/MainForm.cs
+++ b/NohBoard/Forms/MainForm.cs
@@ -412,6 +412,7 @@ private void MainForm_Load(object sender, EventArgs e)
HookManager.EnableKeyboardHook();
}
+ this.UpdateTimer.Interval = GlobalSettings.Settings.UpdateInterval;
this.UpdateTimer.Enabled = true;
this.KeyCheckTimer.Enabled = true;