parameters: (self, widget, event)
return_statement: return False
docstring: Catches Window key presses
docstring_summary: Catches Window key presses
docstring_tokens: Catches Window key presses
function: def on_key_press_window(self, widget, event):
          """Catches Window key presses"""
          if not self.curr_tree_iter: return
          keyname = gtk.gdk.keyval_name(event.keyval)
          if event.state & gtk.gdk.MOD1_MASK:
              if keyname == cons.STR_KEY_LEFT:
                  self.go_back()
                  return True
              elif keyname == cons.STR_KEY_RIGHT:
                  self.go_forward()
                  return True
          elif (event.state & gtk.gdk.CONTROL_MASK):
              if keyname == cons.STR_KEY_TAB:
                  self.toggle_tree_text()
                  return True
              elif keyname in ["plus", "KP_Add"]:
                  if self.treeview.is_focus(): self.zoom_tree(True)
                  else: self.zoom_text(True)
                  return True
              elif keyname in ["minus", "KP_Subtract"]:
                  if self.treeview.is_focus(): self.zoom_tree(False)
                  else: self.zoom_text(False)
                  return True
          return False
function_tokens: def on_key_press_window ( self , widget , event ) : if not self . curr_tree_iter : return keyname = gtk . gdk . keyval_name ( event . keyval ) if event . state & gtk . gdk . MOD1_MASK : if keyname == cons . STR_KEY_LEFT : self . go_back ( ) return True elif keyname == cons . STR_KEY_RIGHT : self . go_forward ( ) return True elif ( event . state & gtk . gdk . CONTROL_MASK ) : if keyname == cons . STR_KEY_TAB : self . toggle_tree_text ( ) return True elif keyname in [ "plus" , "KP_Add" ] : if self . treeview . is_focus ( ) : self . zoom_tree ( True ) else : self . zoom_text ( True ) return True elif keyname in [ "minus" , "KP_Subtract" ] : if self . treeview . is_focus ( ) : self . zoom_tree ( False ) else : self . zoom_text ( False ) return True return False