示例#1
0
 def getKeyNum(self,keysym):
     if keysym=="Up": keysym="UPARROW"
     elif keysym=="Down": keysym="DOWNARROW"
     elif keysym=="Left": keysym="LEFTARROW"
     elif keysym=="Right": keysym="RIGHTARROW"
     else:
         keysym=string.upper(keysym)
     print keysym
     return keybindingsparser.tuple_has_key(keybindingsparser.keysub,keysym)
示例#2
0
 def getKeyNum(self, keysym):
     if keysym == "Up": keysym = "UPARROW"
     elif keysym == "Down": keysym = "DOWNARROW"
     elif keysym == "Left": keysym = "LEFTARROW"
     elif keysym == "Right": keysym = "RIGHTARROW"
     else:
         keysym = string.upper(keysym)
     print keysym
     return keybindingsparser.tuple_has_key(keybindingsparser.keysub,
                                            keysym)
示例#3
0
 def getKeyNum(keyval,keystring):
     if len(keystring)>0:
         keystring=string.upper(keystring)
     else:
         if keyval==65361: keystring="LEFTARROW"
         elif keyval==65362: keystring="UPARROW"
         elif keyval==65363: keystring="RIGHTARROW"
         elif keyval==65364: keystring="DOWNARROW"
         else:
             return -1
     return keybindingsparser.tuple_has_key(keybindingsparser.keysub,keystring)
示例#4
0
 def getKeyNum(keyval, keystring):
     if len(keystring) > 0:
         keystring = string.upper(keystring)
     else:
         if keyval == 65361: keystring = "LEFTARROW"
         elif keyval == 65362: keystring = "UPARROW"
         elif keyval == 65363: keystring = "RIGHTARROW"
         elif keyval == 65364: keystring = "DOWNARROW"
         else:
             return -1
     return keybindingsparser.tuple_has_key(keybindingsparser.keysub,
                                            keystring)