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)
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)
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)
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)