-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mouse_support prevents scrollwheel from working on Linux #224
Comments
Hi @mixmastamyk, Jonathan |
Hmm, nope, shift does allow pasting etc, but scroll-wheel is not working with or without the shift key. It is mate (gnome2) terminal, btw. I've disabled the feature for now since the benefits are not huge and the drawbacks significant. Perhaps it is just the nature of mouse support, if I had a menu or something I might re-enable. |
I don't think this has anything to do with which terminal you're using. I see the same thing with gnome-terminal on linux, iTerm2 on Mac, and rxvt on linux talking to X server on Mac--the terminal only seems to get mouse-2 and mouse-3 events; everything else gets eaten by prompt-toolkit. It would be really nice if I could use mouse clicks to move the cursor in ptpython, while still being able to scroll up and select history for copying in iTerm2. I'm not sure if there's an obvious design to make that work (how do you pass through mouse-1 drags and double-clicks needed for select, while handling mouse-1 clicks?), but if there is, I'd be happy. :) |
I can confirm this on a Mac as well, using the default Apple terminal: mouse integration completely prevents the scrollwheel from scrolling the terminal. It would be great of prompt_toolkit only eats scrollwheel events in contexts where that is applicable (e.g. scrolling through completions or similar), but I have no idea if this is easy to distinguish or not. |
This is normal. Either the terminal can use the mouse to handle text selection or scrolling through the history lines, or the mouse events are sent to the application running in the terminal. But most terminals will still handle the mouse when the application requests mouse events, if you hold alt, option, control or shift while scrolling or selecting text. edit: handling mouse events only in a certain context in unfortunately not possible. This is a limitation of how terminals work. |
Sadly, both in ptpython and IPython 5 on my mac, using the latest pip version of prompt_toolkit (on OS X 10.11.5, using standard apple terminal):
It's a pity because otherwise the mouse support is super awesome! (It's pretty impressive that any of that can work in a terminal in the first place.) |
Ran into this issue on macOS 10.12 when using Xonsh ( xonsh/xonsh#1930 (comment) ). Is a solution possible (apart from turning off mouse supprt in ptk) ? |
@mangecoeur: Which terminal are you using? Some terminals handle scrolling if you press shift or alt. |
Awesome toolkit !!!
Can't use the scrollwheel on my mouse after setting this on Linux:
Latest pptk on Ubuntu Wily.
The text was updated successfully, but these errors were encountered: