Browse Source

Merge pull request #1003 from diath/fix_keyboard_desc

Fix an issue with key combo desc not working properly with integer keys
Konrad Kuśnierz 1 year ago
parent
commit
710212c23a
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      modules/corelib/keyboard.lua

+ 5
- 0
modules/corelib/keyboard.lua View File

@@ -26,6 +26,11 @@ local function retranslateKeyComboDesc(keyComboDesc)
26 26
   if keyComboDesc == nil then
27 27
     error('Unable to translate key combo \'' .. keyComboDesc .. '\'')
28 28
   end
29
+
30
+  if type(keyComboDesc) == 'number' then
31
+    keyComboDesc = tostring(keyComboDesc)
32
+  end
33
+
29 34
   local keyCombo = {}
30 35
   for i,currentKeyDesc in ipairs(keyComboDesc:split('+')) do
31 36
     for keyCode, keyDesc in pairs(KeyCodeDescs) do

Loading…
Cancel
Save