2004-07-18 03:16:08 -03:00
|
|
|
spacekey = ' '
|
|
|
|
returnkey = '\r'
|
|
|
|
tabkey = '\t'
|
|
|
|
enterkey = '\003'
|
|
|
|
backspacekey = '\010'
|
|
|
|
deletekey = '\177'
|
|
|
|
clearkey = '\033'
|
|
|
|
helpkey = '\005'
|
1999-01-30 18:39:17 -04:00
|
|
|
|
2004-07-18 03:16:08 -03:00
|
|
|
leftarrowkey = '\034'
|
|
|
|
rightarrowkey = '\035'
|
|
|
|
uparrowkey = '\036'
|
|
|
|
downarrowkey = '\037'
|
|
|
|
arrowkeys = [leftarrowkey, rightarrowkey, uparrowkey, downarrowkey]
|
1999-01-30 18:39:17 -04:00
|
|
|
|
2004-07-18 03:16:08 -03:00
|
|
|
topkey = '\001'
|
|
|
|
bottomkey = '\004'
|
|
|
|
pageupkey = '\013'
|
|
|
|
pagedownkey = '\014'
|
|
|
|
scrollkeys = [topkey, bottomkey, pageupkey, pagedownkey]
|
1999-01-30 18:39:17 -04:00
|
|
|
|
|
|
|
navigationkeys = arrowkeys + scrollkeys
|
|
|
|
|
|
|
|
keycodes = {
|
2004-07-18 03:16:08 -03:00
|
|
|
"space" : ' ',
|
|
|
|
"return" : '\r',
|
|
|
|
"tab" : '\t',
|
|
|
|
"enter" : '\003',
|
|
|
|
"backspace" : '\010',
|
|
|
|
"delete" : '\177',
|
|
|
|
"help" : '\005',
|
|
|
|
"leftarrow" : '\034',
|
|
|
|
"rightarrow" : '\035',
|
|
|
|
"uparrow" : '\036',
|
|
|
|
"downarrow" : '\037',
|
|
|
|
"top" : '\001',
|
|
|
|
"bottom" : '\004',
|
|
|
|
"pageup" : '\013',
|
|
|
|
"pagedown" : '\014'
|
1999-01-30 18:39:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
keynames = {}
|
|
|
|
for k, v in keycodes.items():
|
2004-07-18 03:16:08 -03:00
|
|
|
keynames[v] = k
|
1999-01-30 18:39:17 -04:00
|
|
|
del k, v
|