Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Can't <Enter> Using Voice Recognition Macros In Fake VIM Mode
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 3 Posters 3.1k Views
  • 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 Offline
    T Offline
    texas
    wrote on last edited by
    #1

    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
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • T Offline
        T Offline
        texas
        wrote on last edited by
        #3

        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
        0
        • D Offline
          D Offline
          Duck
          wrote on last edited by
          #4

          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
          0
          • T Offline
            T Offline
            texas
            wrote on last edited by
            #5

            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
            0
            • T Offline
              T Offline
              texas
              wrote on last edited by
              #6

              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
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved