aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console/window.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-02 11:05:45 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-02 11:05:45 +1200
commit62330e4b0f690e1b5a187b0b1d18654fc51dfe8a (patch)
tree680339989e28876968f65c43faa44b0a5f9fbdc9 /libmproxy/console/window.py
parent5e5e73001fbbe0e07c1c7565789d322749255f10 (diff)
downloadmitmproxy-62330e4b0f690e1b5a187b0b1d18654fc51dfe8a.tar.gz
mitmproxy-62330e4b0f690e1b5a187b0b1d18654fc51dfe8a.tar.bz2
mitmproxy-62330e4b0f690e1b5a187b0b1d18654fc51dfe8a.zip
Enable mouse interaction, add a hint for selecting text.
Fixes #597
Diffstat (limited to 'libmproxy/console/window.py')
-rw-r--r--libmproxy/console/window.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmproxy/console/window.py b/libmproxy/console/window.py
index d64e83df..600ae413 100644
--- a/libmproxy/console/window.py
+++ b/libmproxy/console/window.py
@@ -17,6 +17,16 @@ class Window(urwid.Frame):
def sig_focus(self, sender, section):
self.focus_position = section
+ def mouse_event(self, *args, **kwargs):
+ # args: (size, event, button, col, row)
+ k = super(self.__class__, self).mouse_event(*args, **kwargs)
+ if args[1] == "mouse drag":
+ signals.status_message.send(
+ message = "Hold down alt or ctrl to select text.",
+ expire = 1
+ )
+ return False
+
def keypress(self, size, k):
k = super(self.__class__, self).keypress(size, k)
if k == "?":