mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
console: mouse scrollwheel throughout.
This commit is contained in:
parent
62330e4b0f
commit
b5bb4106fd
@ -20,12 +20,19 @@ class Window(urwid.Frame):
|
|||||||
def mouse_event(self, *args, **kwargs):
|
def mouse_event(self, *args, **kwargs):
|
||||||
# args: (size, event, button, col, row)
|
# args: (size, event, button, col, row)
|
||||||
k = super(self.__class__, self).mouse_event(*args, **kwargs)
|
k = super(self.__class__, self).mouse_event(*args, **kwargs)
|
||||||
|
if not k:
|
||||||
if args[1] == "mouse drag":
|
if args[1] == "mouse drag":
|
||||||
signals.status_message.send(
|
signals.status_message.send(
|
||||||
message = "Hold down alt or ctrl to select text.",
|
message = "Hold down alt or ctrl to select text.",
|
||||||
expire = 1
|
expire = 1
|
||||||
)
|
)
|
||||||
|
elif args[1] == "mouse press" and args[2] == 4:
|
||||||
|
self.keypress(args[0], "up")
|
||||||
|
elif args[1] == "mouse press" and args[2] == 5:
|
||||||
|
self.keypress(args[0], "down")
|
||||||
|
else:
|
||||||
return False
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def keypress(self, size, k):
|
def keypress(self, size, k):
|
||||||
k = super(self.__class__, self).keypress(size, k)
|
k = super(self.__class__, self).keypress(size, k)
|
||||||
|
Loading…
Reference in New Issue
Block a user