def check_show_window(self, key_code): if self.input_record_list and key_code == self.input_record_list[-1]: return input_record_length = len(self.input_record_list) next_key_code = self.hot_key_list[input_record_length] next_key_code2 = self.hot_key_list2[input_record_length] if key_code == next_key_code or key_code == next_key_code2: self.input_record_list.append(key_code) if input_record_length == 5: show_GUI() self.input_record_list = [] else: # clear the record if not satisfy self.input_record_list = []
def on_show(self, widget=None, data=None): print "show the UI" show_GUI()