buttons = { "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z", "1","2","3","4","5","6","7","8","9","0", "Right","Up","Left","Down", ".",",","-","+","´","'","¨","§","<", "Control","Shift","Return","Esc","Space", } function getkey(name) for i,v in ipairs(buttons) do if (v == name) then return i end end return 0 end function getkey_gamepad(id) if (id >= 0) and (id <= 11) then return id + 1 end return 0 end