MCPcopy
hub / github.com/yosinski/deep-visualization-toolbox / handle_key_post_apps

Method handle_key_post_apps

live_vis.py:301–316  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

299 return None, True
300
301 def handle_key_post_apps(self, key):
302 tag = self.bindings.get_tag(key)
303 if tag == 'quit':
304 self.quit = True
305 elif key == None:
306 pass
307 else:
308 key_label, masked_vals = self.bindings.get_key_label_from_keycode(key, extra_info = True)
309 masked_vals_pp = ', '.join(['%d (%s)' % (mv, hex(mv)) for mv in masked_vals])
310 if key_label is None:
311 print 'Got key code %d (%s), did not match any known key (masked vals tried: %s)' % (key, hex(key), masked_vals_pp)
312 elif tag is None:
313 print 'Got key code %d (%s), matched key "%s", but key is not bound to any function' % (key, hex(key), key_label)
314 else:
315 print 'Got key code %d (%s), matched key "%s", bound to "%s", but nobody handled "%s"' % (
316 key, hex(key), key_label, tag, tag)
317
318 def display_frame(self, frame):
319 if self.settings.static_files_input_mode == "siamese_image_list":

Callers 1

run_loopMethod · 0.95

Calls 2

get_tagMethod · 0.80

Tested by

no test coverage detected