diff --git a/scripts/input/input.js b/scripts/input/input.js index 24633af..a8471a6 100644 --- a/scripts/input/input.js +++ b/scripts/input/input.js @@ -70,8 +70,9 @@ let Input = function() { gettingNextKey = true; clickAssign = function(key) { if (key != 'Escape') { - RegisterCommand([key], handlers[IdToKey[id]]); + let handle = handlers[IdToKey[id]]; UnregisterKey(IdToKey[id]); + RegisterCommand([key], handle); IdToKey[id] = key; localStorage[settings.storage.name+`.${id}`] = key; };