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

How would drag work? #21

Closed
willwade opened this issue Mar 7, 2019 · 5 comments
Closed

How would drag work? #21

willwade opened this issue Mar 7, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@willwade
Copy link
Contributor

willwade commented Mar 7, 2019

So I can see we can emulate button press etc.. but can we do something like a drag function?

@hosseinzoda
Copy link

I need to test this one. I will do when the ble device arrives

@hosseinzoda
Copy link

Here's how I did drag and drop.

$ relaykeys-cli --delay 150 mousebutton:l,press mousemove:50,50 mousebutton:0

@joedevsys
Copy link
Contributor

Here's how I did drag and drop.

$ relaykeys-cli --delay 150 mousebutton:l,press mousemove:50,50 mousebutton:0

A similar approach also work when used in separate steps (in the same way some special access joysticks work with a latching drag button):
$ relaykeys-cli mousebutton:l //user presses drag button
$ relaykeys-cli mousemove:, //user moves mouse
$ relaykeys-cli mousemove:, //user moves mouse some more
...
$ relaykeys-cli mousebutton:0 //user presses drag button again

@joedevsys
Copy link
Contributor

Yes this works.
$relaykeys-cli mousebutton:L,press //Phase 1 user activates Drag Start button
...
$ relaykeys-cli mousemove:x,y //user moves mouse
$ relaykeys-cli mousemove:x,y //user moves mouse some more
...
$ relaykeys-cli mousebutton:0 //user activates Drag Stop button

Beware that mousebutton click, doubleclick or even rightclick will clear the drag operation.

I thought this would also work as swipe operation when sent all together e.g. Swipe Right:
$relaykeys-cli mousebutton:L,press
$ relaykeys-cli mousemove:100,0
$ relaykeys-cli mousebutton:0
But on my android phone this is interpreted as a drag-select operation. Testing using the phone's touchscreen, swipe and drag-select are very similar but to swipe you touch and move immediately, but to select text you pause slightly before moving your finger. Does this imply the commands aren't arriving quickly enough for Android to accept the swipe and deciding it's a drag?

gitbook-com bot pushed a commit that referenced this issue Jun 28, 2022
@willwade
Copy link
Contributor Author

willwade commented Jul 6, 2022

Thanks Joe. Im going to close this - but I get your issue. I see something similar on iOS. They are doing wierd things when a mouse is used on those OS' for touch.

@willwade willwade closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants