diff options
-rw-r--r-- | libmproxy/console/__init__.py | 1 | ||||
-rw-r--r-- | libmproxy/console/window.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 8f39e283..7d4a1164 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -416,6 +416,7 @@ class ConsoleMaster(flow.FlowMaster): def run(self): self.ui = urwid.raw_display.Screen() + self.ui.set_mouse_tracking() self.ui.set_terminal_properties(256) self.set_palette(self.palette) self.loop = urwid.MainLoop( 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 == "?": |