just use all of the equivalent ASCII characters/numbers you wish to use... if there is a break in the numbering then yes you have to take that into account in the for loop... as for the keys that you want like Backspace, Home, etc... just add them all with just one line
local class=CreateClass(...)
function class:InitDialog(grid)
self.super:InitDialog(grid)
group=grid:AddGroup("Keys")
local letters = "KEY_UP,KEY_DOWN,KEY_RIGHT,KEY_LEFT,KEY_BACKSPACE"
for i = 65,90 do
letters = letters..",".."KEY_"..string.char(i)
end
group:AddProperty("KEYS",PROPERTY_CHOICE,letters)
group:Expand(1)
end