<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to synthesize a keystroke in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939464#M89616</link>
    <description>&lt;P&gt;I have a Quickwin program that calls GETCHARQQ to read a keystroke. Unlike PEEKCHARQQ (which can only be used in console apps), it blocks execution until user presses a key. In certain program-determined circumstances, I need execution to continue without a user response. My idea is to have the program "put" a character into the keyboard "buffer" (perhaps not the right term) so that GETCHARQQ will respond and continue on its merry way.&lt;/P&gt;
&lt;P&gt;Is there any way to do this? The nearest thing I can find is the API function SendInput. It looks like this is just what I need, but I am not enough of a C++ programmer to understand the documentation or how to implement it. Can anybody help?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2012 22:35:52 GMT</pubDate>
    <dc:creator>dboggs</dc:creator>
    <dc:date>2012-10-31T22:35:52Z</dc:date>
    <item>
      <title>How to synthesize a keystroke</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939464#M89616</link>
      <description>&lt;P&gt;I have a Quickwin program that calls GETCHARQQ to read a keystroke. Unlike PEEKCHARQQ (which can only be used in console apps), it blocks execution until user presses a key. In certain program-determined circumstances, I need execution to continue without a user response. My idea is to have the program "put" a character into the keyboard "buffer" (perhaps not the right term) so that GETCHARQQ will respond and continue on its merry way.&lt;/P&gt;
&lt;P&gt;Is there any way to do this? The nearest thing I can find is the API function SendInput. It looks like this is just what I need, but I am not enough of a C++ programmer to understand the documentation or how to implement it. Can anybody help?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 22:35:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939464#M89616</guid>
      <dc:creator>dboggs</dc:creator>
      <dc:date>2012-10-31T22:35:52Z</dc:date>
    </item>
    <item>
      <title>Since the program is blocked,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939465#M89617</link>
      <description>Since the program is blocked, how are you going to get control to insert the character?</description>
      <pubDate>Fri, 02 Nov 2012 16:09:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939465#M89617</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-11-02T16:09:32Z</dc:date>
    </item>
    <item>
      <title>Here's what I'm hoping (but I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939466#M89618</link>
      <description>Here's what I'm hoping (but I could be all wet):
The program has a mouse event registered (mouse$move). While blocked awaiting a keystroke (such as 'y' to answer a pending question), the user will (presumably) move the mouse to click on a 'yes' button as an alternative to pressing 'y'. The registered callback routine responds to the mouse movement and detects whether the mouse is positioned over the button. So far so good; I have this much working. Now if the callback routine can write a character to the keyboard buffer, it will allow the GETCHARQQ to free its blocking.

I know that another way to accomplish this is to start a second thread; one thread watches for keystrokes while another watches for mouse movement. But that seems more complicated to me than the approach described above.</description>
      <pubDate>Fri, 02 Nov 2012 16:51:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939466#M89618</guid>
      <dc:creator>dboggs</dc:creator>
      <dc:date>2012-11-02T16:51:34Z</dc:date>
    </item>
    <item>
      <title>I wrote a program that uses</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939467#M89619</link>
      <description>I wrote a program that uses SendInput, but QuickWin doesn't see the keystrokes. I think the way you'd have to do this is with subclassing, as the POKER sample does, to intercept the keystroke. I checked with our QuickWin developer and he could not think of a way to do this offhand.</description>
      <pubDate>Fri, 02 Nov 2012 19:43:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939467#M89619</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-11-02T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Thanks for the try Steve. I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939468#M89620</link>
      <description>Thanks for the try Steve. I was afraid that might be the case. You probably saved me a couple of hours of effort. I think I'll pursue the two-threads technique, as suggested in the documentation and the sample program PeekApp or PeekApp3.</description>
      <pubDate>Fri, 02 Nov 2012 20:33:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-synthesize-a-keystroke/m-p/939468#M89620</guid>
      <dc:creator>dboggs</dc:creator>
      <dc:date>2012-11-02T20:33:03Z</dc:date>
    </item>
  </channel>
</rss>

