From 53ac2c612c4ae3b2f45dfd4040d0e53936c8720c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Fri, 24 Oct 2014 09:27:17 +0300 Subject: [PATCH] Ability to remove keybindings with backspace --- menu_state.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/menu_state.lua b/menu_state.lua index c72a384..98f7ce7 100644 --- a/menu_state.lua +++ b/menu_state.lua @@ -122,6 +122,9 @@ function menu_state:keypressed(key, unicode) currentlyChosen:delete() currentlyChosen = nil else + if key == "backspace" then + key = "none" + end KEYMAP[currentlyChosen.data.player][currentlyChosen.data.key][currentlyChosen.data.bindingIdx] = key currentlyChosen.data.label.label = key currentlyChosen:delete()