Example #1
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     old_tab: uw.AttrMap = self.get_focus()
     key = super(TorrentListTabsColumns, self).keypress(size, key)
     new_tab: uw.AttrMap = self.get_focus()
     self.update_focused_tab(old_tab=old_tab, new_tab=new_tab)
     return key
Example #2
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     key = super(ConnectDialog, self).keypress(size, {
         "shift tab": "up",
         "tab": "down"
     }.get(key, key))
     if key in ["esc"]:
         self.close_dialog()
     return key
Example #3
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     if key == "enter":
         self.open_torrent_options_window()
         return None
     if key in ["right"]:
         self.open_torrent_window()
         return None
     return key
Example #4
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     key = super(TorrentAddDialog, self).keypress(size, {
         "shift tab": "up",
         "tab": "down"
     }.get(key, key))
     if key == "esc":
         self.close_window()
     return key
Example #5
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     if key in ["n", "N"]:
         self.main.loop.widget = uw.Overlay(
             top_w=uw.LineBox(ConnectDialog(self.main)),
             bottom_w=self.main.loop.widget,
             align=uw.CENTER,
             width=(uw.RELATIVE, 50),
             valign=uw.MIDDLE,
             height=(uw.RELATIVE, 50),
         )
     return super(AppWindow, self).keypress(size, key)
Example #6
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     key = super(TorrentListWindow, self).keypress(size, key)
     if key in ["a", "A"]:
         self.main.loop.widget = uw.Overlay(
             top_w=uw.LineBox(TorrentAddDialog(self.main)),
             bottom_w=self.main.app_window,
             align=uw.CENTER,
             valign=uw.MIDDLE,
             width=(uw.RELATIVE, 50),
             height=(uw.RELATIVE, 50),
             min_width=20,
         )
     return key
Example #7
0
 def keypress(self, size, key):
     """Ignore key presses by just returning key."""
     log_keypress(logger, self, key)
     return key
Example #8
0
 def keypress(self, size, key):
     log_keypress(logger, self, key)
     key = super(TorrentList, self).keypress(size, key)
     return key