From 89e53b5e6f662d217d75fc8fa8c4c11c47094669 Mon Sep 17 00:00:00 2001 From: Flameshadowxeroshin Date: Fri, 2 Dec 2011 21:28:55 -0600 Subject: [PATCH] add keymap guard --- Themes/_fallback/Scripts/04 KeymapGuard.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Themes/_fallback/Scripts/04 KeymapGuard.lua diff --git a/Themes/_fallback/Scripts/04 KeymapGuard.lua b/Themes/_fallback/Scripts/04 KeymapGuard.lua new file mode 100644 index 0000000000..e0178f930f --- /dev/null +++ b/Themes/_fallback/Scripts/04 KeymapGuard.lua @@ -0,0 +1,19 @@ +--People sometimes have problems where they rebind the enter key and thus cannot press start. +--To work around this problem, this script deletes every key binding to Enter. + +--load Keymaps.ini +local keymaps = IniFile.ReadFile("/Save/Keymaps.ini") + +--iterate through the games +for k,v in keymaps do + --iterate through the potential key mappings + for l,w in v do + --check for enter + w:gsub("Key_enter","") + --write back + keymaps[k][l] = w + end +end + +--write Keymaps.ini back out. yay. +IniFile.WriteFile("/Save/Keymaps.ini",keymaps) \ No newline at end of file