-
Notifications
You must be signed in to change notification settings - Fork 119
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
Select text using douglas, rainbow, and legion #501
Select text using douglas, rainbow, and legion #501
Conversation
@seekM could you update the documentation. |
@kendonB could you test this as well? |
Unfortunately I'm busy with other things at the moment, I'll add documentation later. |
I've tried this and it works beautifully. The process for the fine selection option should be explained a bit more clearly too. Fantastic contribution, I am going to merge this one into my own copy right away. |
@seekM can you test my addition for legion? |
@seekM were you able to review my changes? please test the functionality of the Legion selection and take a look at my changes to the documentation. We will be able to merge after that. |
Legion doesn't work for me at the moment, so I can't test it. Also when I tried to checkout this PR there were some errors which are due to the files in my Caster user folder I think. I don't have time to resovle them at the moment so it would be cool if someone else could review if necessary. |
Could you paste the errors here? |
|
Updating dragonfly2 made these errors go away |
ready to merge? |
legion behavior needs testing by someone other than me for whom legion is working. |
I'd also like someone to review the documentation changes. |
castervoice/doc/readthedocs/Mouse.md
Outdated
- _red 86 kick_: - Clicks at this location. | ||
- _two red 86_ - References square within the second red palette. | ||
- _red 86 select 2 green 10_: - Selects from the first red 86 to the second green 10. | ||
- _red 86, curse sauce lease 5, point one, select 2 green 10, curse dunce lease 10, point two, select_: - Selects from the first red 86 to the second green 10 with fine adjustment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be ,
"red 86 move, curse sauce lease 5, point one, 2 green 10 move, curse dunce lease 10, point two, select"
in the 5th example for rainbow?
Everything else in the documentation seems fine. I tested it and the selection examples seem to work for rainbow Douglas and Legion.
Although, note, I have only one screen, so I couldn't test it with multiple screens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed documentation changes, and these usage examples for rainbow Douglas and Legion seem to work, except for the 5th example in rainbow, just a typo. See my comment on the line change.
Note: I only have one screen. So I can't comment on the multiscreen functionality.
Nice work guys! I implemented a similar feature in recent weeks using Aenea on Linux based on Caster's Douglas grid, I haven't submitted it to the Caster project because my method currently only supports Linux + Aenea, but I've been using it about 50 times per day and it's been very useful! I just thought I'd mention that instead of your "point 1" & "point 2" keywords, you might like to use the keywords "drag" & "release", if you find it more intuitive? In my BeamGrid system I move the mouse to a starting point, I say "drag", then move to the end point, then say "release". |
@codingApprentice, good catch and thanks for having a look! @shervinemami, great point; note that the caster commands "squat" and "bench" are used for holding and releasing the left mouse button. Since Caster now supports Aenea (or is trying to) it would be great for you to to add your code here! The mouse grids / legion are the only thing preventing me from trying out Caster with Aenea at this point. |
I don't see any value in using "point two, select" instead of using "bench" for both. Can anyone think of a reason to keep them separate? |
Can we talk about what we think the default behavior should be? I think the default should act like legion does which is to move the cursor and close the mouse application without clicking. I am going to change douglas and rainbow to this behavior unless there are objections. |
ready to merge? |
Oh I didn't know Caster is trying to support Aenea. I'll discuss that on the gitter forum. |
This PR allows for text selection using douglas and rainbow. There are three ways to select text (using douglas as an example here, rainbow is analogous):
<x1> [by] <y1> select <x2> [by] <y2>
<x1> [by] <y1> select <x2>
(with an implicity2 = y1
value). This is useful to select text which is on one horizontal linepoint one
,point two
), then do aselect
. This allows for precise text selection. How to do it in detail? For the first point you can do<x1> [by] <y1> move
, the fine-tune viacurse
. Then dopoint one
. Then do the same for the second point, thenselect
.Furthermore I replaced
Playback([(["mouse", "right", "click"], 0.0)]).execute()
byMouse("right").execute()
(same for left click). This makes the code more language agnostic. Dragonfly offers a mouse action to drag the mouse, but it didn't work for me. Therefore I usedwin32api, win32con
directly. Doesgrids.wait_for_death(settings.DOUGLAS_TITLE)
work? I couldn't track down the respective setting / value and had to addtime.sleep(0.1)
at one point as a workaround.