Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Can't <Enter> Using Voice Recognition Macros In Fake VIM Mode

    Tools
    3
    6
    2703
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      texas last edited by

      I have to use voice-recognition when interacting with the computer. Qt Creator has really really been great in that respect for programming through voice. I program using the fake vi option which is awesome too. To enhance productivity, I build little voice commands which spit code into the editor e.g. if I say, "queen painter path", the text "QPainterPath" is inserted into the document.

      There is just one issue. I can't seem to issue commands which yield multiple lines of code e.g. I'd like say, "Loop" and have the text "for (int ii = 0 ; ii < max; ii++ ) {<Enter> blah }"

      The problem is that when I'm in fake vi mode, for some reason, the <Enter> key is not received. If I get out of fakevi, it works. I am not saying that fakevi has a bug. What I am doing is weird and off the map, I was just hoping for a clue.

      1 Reply Last reply Reply Quote 0
      • L
        loladiro last edited by

        You could try sending the new line command instead of enter:
        @
        for (int ii = 0 ; ii < max; ii++ ) {\n blah }
        @

        1 Reply Last reply Reply Quote 0
        • T
          texas last edited by

          In my voice program that literally types in backslash 'n'
          There is actually a way.
          I can do this macro (it's just ugg):

          @
          Step1: for ( int ii = 0 ; ii < max; ii++ ) {
          Step2: <ESC> ( go to vim command mode)
          Step3: o ( this will add a newline)
          Step4: }
          @

          1 Reply Last reply Reply Quote 0
          • D
            Duck last edited by

            fakevimhandler.cpp currently has

            @bool isReturn() const { return m_key == Key_Return; }@

            Maybe

            @bool isReturn() const { return m_key == Key_Return || m_key == Key_Enter; }@

            1 Reply Last reply Reply Quote 0
            • T
              texas last edited by

              Thanks for checking. I've always had strange issues with sending voice to different apps. Another oddity with my voice program is that when I say, "Press Enter" it works i.e. it works for individual characters when Dragon interprets. My problem is with the voice macros. I've tried both sending <Enter> and <Return>. It's like I need to send a line feed too or something silly. Oh well.

              it is so difficult to program this way that I have to cut my losses, in other words, a few years ago, I would have dug into that fakevim source... but then I would have to figure out how to recompile it, load it, maybe get the source for Qt etc.

              1 Reply Last reply Reply Quote 0
              • T
                texas last edited by

                This works for me, it's not pretty, but now I can say "loop"

                @
                for ( int ii = 0 ; ii < max; ii++ ) +[{ESC}o+]{ESC}ko
                @

                Now all I need is a little processor to turn actual code into a Dragon macro :)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post