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 Prioritization #241

Closed
ThandiBrown opened this issue Feb 11, 2021 · 5 comments
Closed

Command Prioritization #241

ThandiBrown opened this issue Feb 11, 2021 · 5 comments

Comments

@ThandiBrown
Copy link

ThandiBrown commented Feb 11, 2021

at <phrase> and <phrase>:
    "["
    insert(user.formatted_text(phrase_1, "SNAKE_CASE"))
    "]["
    insert(user.formatted_text(phrase_2, "SNAKE_CASE"))
    "]"
and:" and "

yes so it chooses to pick the second/shorter command
If I say:
"at flex and yank"
It will output:
[flex] and y
Even though the command history registered it as:
"at flex and yank"
(I'm saying the phrase pretty quickly)
The desired output is:
[flex][yank]

@rntz
Copy link

rntz commented Feb 12, 2021

I've been told to put this here.

I'm trying to have a command new line or enter in dictation mode that produces a new line, but escape new line or escape enter will say "new line" or "enter". So I tried:

mode: dictation
-
<phrase>: "{phrase}"
^escape <phrase>$: "ESCAPE {phrase}"
new line: "NEW LINE"
enter: "ENTER"

with the above, saying "escape enter" will produce "ESCAPE enter" as desired, but "escape new line" will produce "escapeNEW LINE" :(

@lunixbochs
Copy link

I couldn't repro the first one initially, but after talking in Slack it turns out there's an additional command mapped:

at <phrase>:
    "["
    insert(user.formatted_text(phrase, "SNAKE_CASE"))
    "]"

@rntz do you have any other dictation commands mapped or is your script set pretty much just this?

@rntz
Copy link

rntz commented Feb 24, 2021

I have many more commands mapped in dictation mode, but I tried making a new mode where I have basically only those commands mapped, and the behavior is the same.

mode: user.bug
-
<phrase>: "{phrase}"
^escape <phrase>$: "ESCAPE {phrase}"
new line: "NEW LINE"
magic: "ENTER"
^bug mode quit | command mode$:
  mode.disable("user.bug")
  mode.enable("command")

@rntz
Copy link

rntz commented Feb 24, 2021

And on gen2, it usually produces an at sign: escape magic -> ESCAPE @magic

@lunixbochs
Copy link

lunixbochs commented Feb 25, 2021

All of these are fixed now in the latest beta (v0.1.4-179)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants