Giter Club home page Giter Club logo

Comments (10)

kovidgoyal avatar kovidgoyal commented on July 22, 2024

Please come up witha reproducer not involving tmux. Simply run

kitty kitten mouse-demo

to see what mouse events are delivered to a program running inside
kitty. And run kitty with --debug-input to see what events are delivered
to kitty itself.

from kitty.

anhpt379 avatar anhpt379 commented on July 22, 2024

It happens when something grabs the mouse (like neovim with set mouse=a, or tmux with set -g mouse on, or less --MOUSE).

Here's how to reproduce it:

  1. Run kitty --debug-input.
  2. Run less --MOUSE /path/to/a/file on the newly created window (I'm using less version 643).
  3. Start dragging, with the starting point in the window.
  4. Drag the mouse out of the window, and release.

When releasing the mouse in the window, the debug log shows 2 events:

Move x: 116.0 y: 282.1 grabbed: 1
Move x: 116.4 y: 282.1 grabbed: 1
Move x: 116.9 y: 282.1 grabbed: 1
Release mouse_button: 0 mods: none grabbed: 1
on_mouse_input: release button: left mods: none grabbed: 1 handled_in_kitty: 0
Move x: 117.9 y: 282.1 grabbed: 1
Move x: 118.3 y: 282.1 grabbed: 1

When releasing the mouse outside of the window, the debug log doesn't show the on_mouse_input line:

Move x: -104.3 y: 105.2
Move x: -104.6 y: 105.0
Release mouse_button: 0 mods: none
Move x: -104.1 y: 104.8
Move x: -101.7 y: 106.0

When running less without --MOUSE and trying to release the mouse both inside & outside the window, the debug log shows only something like this (with no on_mouse_input line):

Move x: 32.7 y: 101.6 handled as drag move
Move x: 32.2 y: 101.6 handled as drag move
Release mouse_button: 0 mods: none handled as drag end
Move x: 31.2 y: 101.6 grabbed: 0
Move x: 31.6 y: 101.6 grabbed: 0

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

kitten mouse-demo grabs the mouse. It doesn't reproduce for me in either
X11 or macOS (via VNC) with kitten mouse-demo. Haven't tried with less
but I dont see why that would make a difference. Are you saying it
doesn't reproduce for you with mouse-demo but does with less? Or if it
reproduces with both is there something unusual about your system? I
will try it on macOS without VNC when I next have access to my mac.

from kitty.

anhpt379 avatar anhpt379 commented on July 22, 2024

For kitty kitten mouse-demo, when I drag & release the mouse in the window, the Type always stays at move. When I release the mouse outside of the window, the Type switches to release. I don't know what that means.

For less or nvim with mouse mode on, they don't provide any visual indicator for the issue. The only difference I saw was the on_mouse_input line in the kitty --debug-input log.

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

type switching to release means the release event is being reported,
correctly. Make sure your mouse doesnt move while releasing if you are
not seeing the release event in mouse-demo. I'll look at it with less
when I have a moment.

from kitty.

anhpt379 avatar anhpt379 commented on July 22, 2024

I'm sure that my mouse doesn't move when I release the button. The type in mouse-demo only switches to release when I release the mouse outside the window. When inside, the type always stays at move both when I drag & when I release the mouse button.

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

from kitty.

anhpt379 avatar anhpt379 commented on July 22, 2024

I made a recording for it:
https://github.com/kovidgoyal/kitty/assets/222319/3f13166a-ad6d-4120-8c7c-4e7ec64f7035

Can you suggest what else for me to try?

from kitty.

kovidgoyal avatar kovidgoyal commented on July 22, 2024

You dont need to try anything, your original issue is fixed already.

from kitty.

anhpt379 avatar anhpt379 commented on July 22, 2024

ah, sorry I didn't notice the commit. Thank you for being so responsive :)

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.