-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Emulating 2-dimensional scrolling with arrow keys #2819
Comments
Not something I am interested in, but look in mouse.c IIRC kitty already |
Only for vertical scrolling, kitty doesn't currently support horizontal scrolling.
For vertical scrolling in vim you can do that by enabling mouse mode and mapping scroll up/down:
If you want horizontal scrolling you have to implement support for that in mouse.c. Though, I'm not sure if vim supports horizontal scrolling either (it doesn't work out of the box in xterm at least). If not, you can disable mouse mode in vim so kitty sends arrow keys like @kovidgoyal said. For horizontal scrolling, this also has to be implemented in mouse.c though. |
Thank you for the info. I just realized another issue with scrolling. As I use a trackball for scrolling, which is the same as scrolling with mouse movement when a button is down, I am able to send scroll events at a much higher frequency than with a typical wheel, like scrolling for more than 60 steps a second. In konsole, terminology and gnome-terminal the scrolling always stops when the input device stops. I saw that there are something about momentum scrolling in mouse.c. Does this lag have anything to do with momentum scrolling, or is kitty just taking the time to process the scroll events ( and presumably redraw after scrolling each step) ? |
There are two different code paths, one for high resolution scrolling like track pads and I think for normal mice on macOS as well and one code path for low resolution scrolling, like with normal mice. This information is supplied by the OS. Look at |
I was wrong, normal mice on macOS are not counted as high-resolution, it's just that because of scrolling acceleration, mice can generate very small scrolling deltas. |
Vim supports |
Thank you @kovidgoyal ! |
Is there a way to disable this behavior and just have kitty not send anything? Sending |
Can I get the terminal emulator to send the four arrow keys to the enclosed program
when receiving vertical and horizontal scroll events?
Better yet only do so when user-specified programs are detected, as this may break in some situations?
In vim, for example, I could then use a mouse/trackball/joystick to move the (terminal) cursor around without
moving the actual mouse cursor, the inability of which is probably why navigating with keyboards
still feels better than that with the continuous devices.
If I would like to implement it, where shall I start?
A related issue is high-precision scrolling.
I configured a trackball to act as a (high-precision) wheel when a button is pressed,
and I feel that the minimal amount of movement to trigger any scrolling is larger in kitty than in, say, Firefox.
To ensure that the cursor can reach every row I have to use wheel_scroll_multiplier 1.0.
So I would like the terminal to move by one row more when an as-small-as-possible movement is detected.
How does kitty process high-precision scrolling events?
The text was updated successfully, but these errors were encountered: