晚上好大家,
我有一个使用 Python Urwid 库构建的应用程序。它有几个字段,因此使用“Page Down”或“Down”键需要相当长的时间才能进入应用程序的底部。我只是想知道是否有任何按键操作直接将光标带到底部。与此类似的东西:
class SimulationView(urwid.WidgetWrap): (line 6)
{
def get_main_frame(self): (line 127)
buttons_box = urwid.ListBox(buttons_walker) (line 148)
errors_box = urwid.ListBox(self.errors_content) (line 155)
sim_listbox = urwid.ListBox(self.sim_list_content)(line 158)
body = urwid.Pile([(6, buttons_box),('weight', 4, sim_listbox),
('weight', 1, errors_box)])
frame = urwid.Frame(body, header=header)
return frame
def keypress(self, size, key):
If key is "a":
# command to take the cursor to the bottom of the application
}
提前致谢。