aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjlhonora <jlhonora@ing.puc.cl>2015-07-08 12:10:03 -0300
committerjlhonora <jlhonora@ing.puc.cl>2015-07-08 12:10:03 -0300
commit1ebdda79029a66330983648326e2eef883415e03 (patch)
treed03dd2cef2084d7da04add354adabe1ddd5057d9
parentf8243086f6f052d2fb88f2dc636717b999edb661 (diff)
downloadmitmproxy-1ebdda79029a66330983648326e2eef883415e03.tar.gz
mitmproxy-1ebdda79029a66330983648326e2eef883415e03.tar.bz2
mitmproxy-1ebdda79029a66330983648326e2eef883415e03.zip
Match g/G shortcuts to less, fix #631
-rw-r--r--libmproxy/console/flowlist.py8
-rw-r--r--libmproxy/console/grideditor.py4
-rw-r--r--libmproxy/console/help.py6
-rw-r--r--libmproxy/console/searchable.py4
4 files changed, 11 insertions, 11 deletions
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py
index bb23df75..46cd0de1 100644
--- a/libmproxy/console/flowlist.py
+++ b/libmproxy/console/flowlist.py
@@ -50,9 +50,9 @@ class EventListBox(urwid.ListBox):
self.master.clear_events()
key = None
elif key == "G":
- self.set_focus(0)
- elif key == "g":
self.set_focus(len(self.master.eventlist) - 1)
+ elif key == "g":
+ self.set_focus(0)
return urwid.ListBox.keypress(self, size, key)
@@ -338,10 +338,10 @@ class FlowListBox(urwid.ListBox):
self.master.clear_flows()
elif key == "e":
self.master.toggle_eventlog()
- elif key == "G":
+ elif key == "g":
self.master.state.set_focus(0)
signals.flowlist_change.send(self)
- elif key == "g":
+ elif key == "G":
self.master.state.set_focus(self.master.state.flow_count())
signals.flowlist_change.send(self)
elif key == "l":
diff --git a/libmproxy/console/grideditor.py b/libmproxy/console/grideditor.py
index b20e54e4..c93ecabf 100644
--- a/libmproxy/console/grideditor.py
+++ b/libmproxy/console/grideditor.py
@@ -416,9 +416,9 @@ class GridEditor(urwid.WidgetWrap):
res.append(i[0])
self.callback(self.data_out(res), *self.cb_args, **self.cb_kwargs)
signals.pop_view_state.send(self)
- elif key == "G":
- self.walker.set_focus(0)
elif key == "g":
+ self.walker.set_focus(0)
+ elif key == "G":
self.walker.set_focus(len(self.walker.lst) - 1)
elif key in ["h", "left"]:
self.walker.left()
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py
index 5a63cb10..ba87348d 100644
--- a/libmproxy/console/help.py
+++ b/libmproxy/console/help.py
@@ -28,7 +28,7 @@ class HelpView(urwid.ListBox):
keys = [
("j, k", "down, up"),
("h, l", "left, right (in some contexts)"),
- ("g, G", "go to end, beginning"),
+ ("g, G", "go to beginning, end"),
("space", "page down"),
("pg up/down", "page up/down"),
("arrows", "up, down, left, right"),
@@ -108,8 +108,8 @@ class HelpView(urwid.ListBox):
return None
elif key == "?":
key = None
- elif key == "G":
- self.set_focus(0)
elif key == "g":
+ self.set_focus(0)
+ elif key == "G":
self.set_focus(len(self.body.contents))
return urwid.ListBox.keypress(self, size, key)
diff --git a/libmproxy/console/searchable.py b/libmproxy/console/searchable.py
index 627d595d..dea0ac7f 100644
--- a/libmproxy/console/searchable.py
+++ b/libmproxy/console/searchable.py
@@ -33,10 +33,10 @@ class Searchable(urwid.ListBox):
self.find_next(False)
elif key == "N":
self.find_next(True)
- elif key == "G":
+ elif key == "g":
self.set_focus(0)
self.walker._modified()
- elif key == "g":
+ elif key == "G":
self.set_focus(len(self.walker) - 1)
self.walker._modified()
else: