From 705ef64b4d2dd506597796ec9f3b7841e0c6a7bb Mon Sep 17 00:00:00 2001 From: xChipseq Date: Tue, 2 Sep 2025 22:27:04 +0200 Subject: [PATCH] fix helper method returning null if no keybind --- MiraAPI/Keybinds/KeybindUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MiraAPI/Keybinds/KeybindUtils.cs b/MiraAPI/Keybinds/KeybindUtils.cs index 3d342d6..fbca1d6 100644 --- a/MiraAPI/Keybinds/KeybindUtils.cs +++ b/MiraAPI/Keybinds/KeybindUtils.cs @@ -33,11 +33,11 @@ public static class KeybindUtils /// /// The action ID. /// The keyboard keycode. - public static KeyboardKeyCode? GetKeycodeByActionId(int actionId) + public static KeyboardKeyCode GetKeycodeByActionId(int actionId) { var player = ReInput.players.GetPlayer(0); return player.controllers.maps.GetFirstElementMapWithAction(ControllerType.Keyboard, actionId, false)? - .keyboardKeyCode; + .keyboardKeyCode ?? KeyboardKeyCode.None; } ///