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

New command to scroll mouse wheel continuously #802

Merged
merged 2 commits into from
May 14, 2020

Conversation

dusty-phillips
Copy link
Contributor

@dusty-phillips dusty-phillips commented Apr 30, 2020

New command to scroll mouse wheel continuously

Description

Initiate scrolling as an asynchronous action until the user says cancel.

command is zinc sauce|dunce <speed> where speed is one of super slowly, slowly, normal, fast and superfast.

Motivation and Context

I got tired of saying "scree dunce" repeatedly when I didn't know how far I wanted to scroll.
The existing <direction> <time_in_seconds> command does a similar thing, except that it moves the cursor while doing so.
The VSCode "scroll up/down" and "scroll page down/up" commands do a similar thing in that they don't move the cursor, but they do not operate continuously.

I chose the name zinc because it seems unique and Dragon is good at picking up the z sound.

How Has This Been Tested

I have tested the new command in VS code and chrome. In both cases it initiated scrolling in the correct direction and cancelled appropriately. I have only tested using Dragon

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue or bug)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Renamed existing command phrases (we discourage this without a strong rationale).

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have checked that my code does not duplicate functionality elsewhere in Caster.
  • I have checked for and utilized existing command phrases from within Caster (delete if not applicable).
  • My code implements all the features I wish to merge in this pull request.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests pass.

Maintainer/Reviewer Checklist

  • Basic functionality has been tested and works as claimed.
  • New documentation is clear and complete.
  • Code is clear and readable.

@dusty-phillips
Copy link
Contributor Author

I forgot to mention that this outputs an extraneous unnamed command (A) in the output window, but I don't know why.

@LexiconCode LexiconCode added the Caster Core Spec Issues for Caster Specs that are not part of the application or language specific grammar/ccr label Apr 30, 2020
@kendonB
Copy link
Collaborator

kendonB commented Apr 30, 2020

@dusty-phillips is there any reason not to use scree here? That would be more consistent with the other command.

@kendonB
Copy link
Collaborator

kendonB commented Apr 30, 2020

I have tested this and it seems to work on kaldi.

@kendonB
Copy link
Collaborator

kendonB commented Apr 30, 2020

I have tested this and it seems to work on DPI15.

@kendonB
Copy link
Collaborator

kendonB commented Apr 30, 2020

One other request: are you able to import the cancel spec from castervoice.rules.ccr.standard? This really should have been done long ago for the other one as well. Would be great to change the other one also while we're at it.

@dusty-phillips
Copy link
Contributor Author

I went one further and replaced "cancel" with SymbolSpecs.CANCEL for all async actions. I can undo the others if necessary.

@dusty-phillips
Copy link
Contributor Author

dusty-phillips commented May 1, 2020

Note: This is failing with the "cancel" changes. I didn't test last night. 😳 I'm not sure why, though. The problem is that it doesn't. Initiating the command works fine.

@LexiconCode
Copy link
Member

I will test this out tomorrow and see if I can reproduce your issue.

@LexiconCode
Copy link
Member

LexiconCode commented May 3, 2020

Note: This is failing with the "cancel" changes. I didn't test last night. 😳 I'm not sure why, though. The problem is that it doesn't. Initiating the command works fine.

Review ContextSet
SymbolSpecs.CANCEL is a spec whereas "cancel" in the context of an asynchronous action references rspec of a registered action.

rspec is necessary because a spec can change with simplified transformers/user edited specs.

https://caster.readthedocs.io/en/latest/readthedocs/Rule_Construction/Caster_Rules/ContextStack/

@dusty-phillips
Copy link
Contributor Author

I removed the problematic commit for now.

@LexiconCode LexiconCode added the New Feature A new feature that is not currently implemented. label May 13, 2020
@LexiconCode
Copy link
Member

If this is ready I will merge.

@dusty-phillips
Copy link
Contributor Author

It's been working well for me, I think it's ready.

Dusty Phillips added 2 commits May 14, 2020 10:19
This is very similar to the
`<direction> <time_in_seconds>`
except that in most editing programs it doesn't move the cursor.
I was under the impression that it would
interfere with the existing scree command since it has the same format.
But it is actually unique in that
<nnavi500> and <time_in_seconds> don't overlap.
@LexiconCode LexiconCode merged commit 10327a5 into dictation-toolbox:master May 14, 2020
@dusty-phillips dusty-phillips deleted the wheel_scroll branch May 15, 2020 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caster Core Spec Issues for Caster Specs that are not part of the application or language specific grammar/ccr New Feature A new feature that is not currently implemented.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants