<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[warten, bis Taste losgelassen wurde]]></title><description><![CDATA[<p>Hy,</p>
<p>ich hab folgendes Problem:<br />
Ich frage ab, ob eine bestimmte tastenkomb. gedrückt wird. Ich möchte aber, dass das &quot;T&quot; im folgenden Bsp. nur <strong>einmal</strong> ausgegeben wird, auch wenn man die Taste gedrückt lässt. Also suche ich eine Möglichkeit, wie ich erreichen kann, dass das Programm wartet, bis die taste losgelassen wird und erst wieder das &quot;T&quot; ausgibt, wenn sie erneut gedrückt wurde. Kann mir jemand helfen??</p>
<pre><code class="language-cpp">if(GetAsyncKeyState(90)&amp;1 ==1)
{
       if (GetAsyncKeyState(VK_MENU) &amp;&amp; GetAsyncKeyState(VK_CONTROL))
       {                
           cout&lt;&lt;&quot;T&quot;; 
       }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/176751/warten-bis-taste-losgelassen-wurde</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 03:23:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/176751.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Mar 2007 15:41:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 15:41:54 GMT]]></title><description><![CDATA[<p>Hy,</p>
<p>ich hab folgendes Problem:<br />
Ich frage ab, ob eine bestimmte tastenkomb. gedrückt wird. Ich möchte aber, dass das &quot;T&quot; im folgenden Bsp. nur <strong>einmal</strong> ausgegeben wird, auch wenn man die Taste gedrückt lässt. Also suche ich eine Möglichkeit, wie ich erreichen kann, dass das Programm wartet, bis die taste losgelassen wird und erst wieder das &quot;T&quot; ausgibt, wenn sie erneut gedrückt wurde. Kann mir jemand helfen??</p>
<pre><code class="language-cpp">if(GetAsyncKeyState(90)&amp;1 ==1)
{
       if (GetAsyncKeyState(VK_MENU) &amp;&amp; GetAsyncKeyState(VK_CONTROL))
       {                
           cout&lt;&lt;&quot;T&quot;; 
       }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1251689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251689</guid><dc:creator><![CDATA[tsp]]></dc:creator><pubDate>Sat, 24 Mar 2007 15:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 16:57:38 GMT]]></title><description><![CDATA[<p>MSDN: If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState.</p>
<p>auf deutsch: wenn 0x0001, dann wurde die taste seit dem letzten aufruf gedrückt, wenn 0x1000, dann ist die taste im momment gedrückt, also:</p>
<pre><code class="language-cpp">if ((GetAsyncKeyState(VK_MENU) &amp;0x0001 ) &amp;&amp; (GetAsyncKeyState(VK_CONTROL) &amp;0x0001 ))
</code></pre>
<p>so meinst du das oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251734</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Sat, 24 Mar 2007 16:57:38 GMT</pubDate></item><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 17:07:23 GMT]]></title><description><![CDATA[<p>Perfekt,</p>
<p>genau das suchte ich.</p>
<p>Vielen dank <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251741</guid><dc:creator><![CDATA[tsp]]></dc:creator><pubDate>Sat, 24 Mar 2007 17:07:23 GMT</pubDate></item><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 19:43:37 GMT]]></title><description><![CDATA[<p>Warum verwendets Du nicht die normalen Fenster Nachrichten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251852</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 24 Mar 2007 19:43:37 GMT</pubDate></item><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 20:12:37 GMT]]></title><description><![CDATA[<p>guck mal - er hat &quot;cout&quot; im code.</p>
<p>obwohl, müsste so auch gehen:</p>
<pre><code class="language-cpp">PeekMessage(&amp;msg, NULL, 0,0, PM_REMOVE)
	if(msg.message == WM_KEYDOWN)
	{
		switch(msg.wParam)
		{
		case VK_MENU:
			// öhm, und wie jetzt hier? so oder -
			if(GetAsyncKeyState(VK_CONTROL)&amp; 0x0001)
			{
				cout &gt;&gt; 'T';
			}
		}
	}
</code></pre>
<p>ne, das ist bescheuert xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251870</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Sat, 24 Mar 2007 20:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to warten, bis Taste losgelassen wurde on Sat, 24 Mar 2007 21:53:03 GMT]]></title><description><![CDATA[<p>Martin meint vermutlich WM_KEYDOWN, WM_KEYUP...</p>
<p>Und wenn Du was mit Menüs machst, warum nimmst Du keine &quot;Accelerations&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251925</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 24 Mar 2007 21:53:03 GMT</pubDate></item></channel></rss>