My GitHub Repository

I’ve been a little hesitant to publish a complete repository of all my Dragonfly commands because I think the journey that got me there is more useful than the raw code. If you just read the code, you’ll miss out on why I made certain decisions, you won’t know about all the stuff I tried and deleted, and you won’t know how I actually use all the commands in combination. That said, I do think it is a helpful supplement to this blog, so I decided to go ahead and make it available on GitHub. You can find it here, or linked from the navigation sidebar on every page.

While I’m laying down disclaimers, I should also mention that the code is a work in progress and isn’t as clean and modular as I would like, but I decided it was better to just get the code out there and improve it later. If you make improvements, please send me pull requests!

6 thoughts on “My GitHub Repository”

  1. hello James, thanks for sharing. I have a question regarding Dragonfly: which keyboard layout do you use for dragonfly?
    I use US English keyboard but I have the following problem:
    The code
    Text("Hello world ( ) { }")
    in my macros is interpreted as
    Hello world } ] ^B ^N

    which leads to funny behaviour when trying to voice program in my IDE. Do you by any chance know where the problem might be?

    1. That’s odd, I use the same layout. My guess is that maybe Dragon is not recognizing whatever command you bound to that, and so it prints its misrecognition directly. Try changing the voice binding to something really simple like “hello” for testing.

  2. Great work, James! I really appreciate your website and your repository! I used your repository as starting point to make my own setup. I had a problem running your code for the first time and thought I should mention it.

    RuleWrap are used in your code, but to get it working I had to change one file in the dragonfly package: In “”, I had to add RuleWrap to the list of imports.

  3. Hello ! First of all, thanks for your great work with this blog, its a huge help for us with hands that needs a relief from typing.
    I am at this moment trying to tweak your first half of code into a setup that fits my need, while keeping your core (i.e. the repeat-rule etc.) I do not understand much of it all yet, but there’s progress 🙂

    I am puzzled by a problem tho: I have a nordic keyboard, and there some symbols (like $| [ and [) are activated as alt+ctrl (altso known as right-alt or altGr) + number. None of these works when spelling chars using your setup, as e.g. “lake” or “plain lake”. My observations: In _repeat the symbol_map, merged with the letters and numbers goes into the DictList variable char_dict_list, which as i understand is just the output values from dragon given the spoken inputs. Therefore i was surprised to see that dragon without natlink activated dictates just fine with all alt-gr variables “left brace” “backslash” “dollar” etc.

    When i open windows On-screen keyboard and say “lake lake lake lake lake” you can glimse the keys that it presses, and it seems that it only presses ctrl+number but im not sure how realiable it is. Do you have a guess of whats going on here?

    1. Hi Mads, happy to hear my blog is helping you. I haven’t tried using my setup with a non-US keyboard — I’m a little surprised it wouldn’t “just work” given that all the keypresses are simulated. The keypresses go through Dragonfly’s “Key” action, which uses SendInput under the hood, calling into a core Windows DLL. You might have some luck Googling to see if there’s something you can do in Windows to make SendInput work properly with US keypresses. Failing that, I’d recommend just changing those Key actions to simply call the alt+ctrl sequence that you would normally use (syntax would be “ca-1, ca-2, ca-3” for the sequence control+alt+123).

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is supported. Make sure raw < and > are wrapped in code blocks. You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.