<?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 Re: How to accept a Jig keyword without entering an extra space key or enter key in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12442812#M6240</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt; &lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;reply&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN&gt;It&lt;/SPAN&gt; &lt;SPAN&gt;seems&lt;/SPAN&gt; &lt;SPAN&gt;promising&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN&gt;I&lt;/SPAN&gt; &lt;SPAN&gt;added&lt;/SPAN&gt; &lt;SPAN&gt;some&lt;/SPAN&gt; &lt;SPAN&gt;code&lt;/SPAN&gt; &lt;SPAN&gt;like&lt;/SPAN&gt; &lt;SPAN&gt;below&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private class JigFilter : IMessageFilter
        {
            const int WM_KEYDOWN = 0x0100;
            public bool PreFilterMessage(ref Message m)
            {
                Autodesk.AutoCAD.ApplicationServices.Document acDoc = AcadApp.DocumentManager.MdiActiveDocument;
                Editor acEditor = acDoc.Editor;
                if (m.Msg == WM_KEYDOWN &amp;amp;&amp;amp; (Keys)m.WParam == Keys.A)
                {
                    acEditor.WriteMessage("A ");
                    //acEditor.WriteMessage("A\n");
                    return true;
                }
                return false;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It&lt;/SPAN&gt; &lt;SPAN&gt;did&lt;/SPAN&gt; &lt;SPAN&gt;catch&lt;/SPAN&gt;&lt;SPAN&gt; the A keystroke. However when I tried to send "A " or "A\n" back to the dragging. The Drag status is PromptStatus.Other instead of PromptStatus.Keyword and the StringResult is null. I believe there are other ways to send the message back to keyword. Could you give me more specific instructions? Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 15 Dec 2023 06:12:03 GMT</pubDate>
    <dc:creator>Miralkong</dc:creator>
    <dc:date>2023-12-15T06:12:03Z</dc:date>
    <item>
      <title>How to accept a Jig keyword without entering an extra space key or enter key</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12441071#M6238</link>
      <description>&lt;P&gt;I'm using Jig for a block reference insertion. Everything is fine except that I have to enter an extra space key or enter key to let AutoCAD know that the keyword has been entered completely.&lt;/P&gt;&lt;P&gt;I find another application which sets all keywords with only one letter. In that case, when users finish typing the letter(without space key or enter key), the application could respond immediately.&lt;/P&gt;&lt;P&gt;Base on the application's UI, I guess the message and keywords settings are as follow:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;JigPromptPointOptions jigOpts = new JigPromptPointOptions();

jigOpts.UserInputControls = (
    UserInputControls.Accept3dCoordinates
  | UserInputControls.NoZeroResponseAccepted
  | UserInputControls.NoNegativeResponseAccepted);

jigOpts.SetMessageAndKeywords("\nSpecify intertion point[Rotate90(A)/HFlip(S)/VFlip(D)/ChangeBasePt(T)]", "A S D T");&lt;/LI-CODE&gt;&lt;P&gt;But I could not figure out how to eliminate the space key or enter key.&amp;nbsp; Could someone help? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 13:14:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12441071#M6238</guid>
      <dc:creator>Miralkong</dc:creator>
      <dc:date>2023-12-14T13:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to accept a Jig keyword without entering an extra space key or enter key</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12442225#M6239</link>
      <description>&lt;P&gt;I think the only way to do that is to monitor keystrokes using a message filter.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 21:52:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12442225#M6239</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2023-12-14T21:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to accept a Jig keyword without entering an extra space key or enter key</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12442812#M6240</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt; &lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;reply&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN&gt;It&lt;/SPAN&gt; &lt;SPAN&gt;seems&lt;/SPAN&gt; &lt;SPAN&gt;promising&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN&gt;I&lt;/SPAN&gt; &lt;SPAN&gt;added&lt;/SPAN&gt; &lt;SPAN&gt;some&lt;/SPAN&gt; &lt;SPAN&gt;code&lt;/SPAN&gt; &lt;SPAN&gt;like&lt;/SPAN&gt; &lt;SPAN&gt;below&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private class JigFilter : IMessageFilter
        {
            const int WM_KEYDOWN = 0x0100;
            public bool PreFilterMessage(ref Message m)
            {
                Autodesk.AutoCAD.ApplicationServices.Document acDoc = AcadApp.DocumentManager.MdiActiveDocument;
                Editor acEditor = acDoc.Editor;
                if (m.Msg == WM_KEYDOWN &amp;amp;&amp;amp; (Keys)m.WParam == Keys.A)
                {
                    acEditor.WriteMessage("A ");
                    //acEditor.WriteMessage("A\n");
                    return true;
                }
                return false;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It&lt;/SPAN&gt; &lt;SPAN&gt;did&lt;/SPAN&gt; &lt;SPAN&gt;catch&lt;/SPAN&gt;&lt;SPAN&gt; the A keystroke. However when I tried to send "A " or "A\n" back to the dragging. The Drag status is PromptStatus.Other instead of PromptStatus.Keyword and the StringResult is null. I believe there are other ways to send the message back to keyword. Could you give me more specific instructions? Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Dec 2023 06:12:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12442812#M6240</guid>
      <dc:creator>Miralkong</dc:creator>
      <dc:date>2023-12-15T06:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to accept a Jig keyword without entering an extra space key or enter key</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12443312#M6241</link>
      <description>&lt;P&gt;you can catch the keydown message,if the message is expected then send enter to the command line or using&amp;nbsp;keybd_event to&amp;nbsp; emulate 'enter'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way to catch the keydown&amp;nbsp; &amp;nbsp;messgae is using Application.PreTranslateMessage, see&amp;nbsp; &amp;nbsp; &lt;A href="https://www.cnblogs.com/chenshuangjian/p/15958356.html" target="_blank" rel="noopener"&gt;https://www.cnblogs.com/chenshuangjian/p/15958356.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 11:59:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-accept-a-jig-keyword-without-entering-an-extra-space-key/m-p/12443312#M6241</guid>
      <dc:creator>braistorm</dc:creator>
      <dc:date>2023-12-15T11:59:14Z</dc:date>
    </item>
  </channel>
</rss>

