Skip to content
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

Command drag doesn't show dragging without eye tracker (Mac OS Mojave) #81

Open
DJA89 opened this issue Jun 19, 2020 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@DJA89
Copy link

DJA89 commented Jun 19, 2020

To reproduce, using only a mouse or touchpad (without eye tracker) do the following:
Place your cursor on a window's title bar, say the command "drag", move your cursor to a different place, say the command "drag".

I would expect it to move the window while I'm moving my cursor like it would were I pressing the mouse's button while dragging.

What I see is that the window does not move at all and I have no indication that it's working (or not), but after I issue the second "drag" command the window instantly moves to where the cursor is as if I had been dragging it all along.

@lunixbochs
Copy link

This script can fix it I think:

from talon import ctrl, tap

def on_move(typ, e):
    buttons = ctrl.mouse_buttons_down()
    if not e.flags & tap.DRAG and buttons:
        e.flags |= tap.DRAG
        e.button = buttons[0]
        e.modify()

tap.register(tap.MMOVE | tap.HOOK, on_move)

@knausj85
Copy link

knausj85 commented Dec 6, 2020

FYI, this workaround doesn't seem to work anymore.

I tried the below on 0.1.2-111 & Big Sur (11.0.1) since I have clickless mouse thingy I use from time to time.

if app.platform == "mac":
    from talon import tap

    def on_move(e):
        buttons = ctrl.mouse_buttons_down()
        if not e.flags & tap.DRAG and buttons:
            e.flags |= tap.DRAG
            #buttons is a set now
            e.button = next(iter(buttons))
            e.modify()

    tap.register(tap.MMOVE | tap.HOOK, on_move)

@lunixbochs lunixbochs added the enhancement New feature or request label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants