<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/723" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2007-09-08T20:41:34+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/723</id>

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-09-08T20:41:34+02:00</updated>

		<published>2007-09-08T20:41:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=723&amp;p=2303#p2303</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=723&amp;p=2303#p2303"/>
		<title type="html"><![CDATA[HIDKeys.. several keys input on the same time]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=723&amp;p=2303#p2303"><![CDATA[
For real keyboard features (such as multiple keys pressed), please look at the C64 keyboard in the projects section. The code published there is capable to do that (among other things).<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Sat Sep 08, 2007 8:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2007-09-05T19:18:02+02:00</updated>

		<published>2007-09-05T19:18:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=723&amp;p=2266#p2266</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=723&amp;p=2266#p2266"/>
		<title type="html"><![CDATA[HIDKeys.. several keys input on the same time]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=723&amp;p=2266#p2266"><![CDATA[
hello.<br />i'm sorry, but my english is terrible..<br />--<br /><br />i want to several keys input on the same time keyboard based on &quot;HIDKeys&quot;<br /><br />original keyPressed function is<br />scan PB 0~6 pin, PC 0~6 pin, PD 0~5 pin<br />when detect &quot;1&quot;, stop the scan and return this key.<br />and no scan next keys..<br /><br />so, i first tried keyPressed included Queue for remove repetition.<br /><br />like this:<br /><div class="codebox"><p>Code: </p><pre><code>static uchar    keyPressed&#40;void&#41;<br />&#123;<br />   uchar   i, mask, x;<br />   uchar key=0;<br /><br />   x = PINB;<br />   mask = 1;<br />   for&#40;i=0;i&lt;6;i++&#41;&#123;<br />      if&#40;&#40;x &amp; mask&#41; == 0&#41; &#123;<br />         key = i+1;<br />         if&#40;!FzQ_inQue&#40;key&#41;&#41; &#123;<br />            FzQ_Push&#40;key&#41;;<br />            return key;<br />         &#125;<br />      &#125;<br />        mask &lt;&lt;= 1;<br />   &#125;<br />   x = PINC;<br />   mask = 1;<br />   for&#40;i=0;i&lt;6;i++&#41;&#123;<br />      if&#40;&#40;x &amp; mask&#41; == 0&#41; &#123;<br />         key = i+7;<br />         if&#40;!FzQ_inQue&#40;key&#41;&#41; &#123;<br />            FzQ_Push&#40;key&#41;;<br />            return key;<br />         &#125;<br />      &#125;<br />      mask &lt;&lt;= 1;<br />   &#125;<br />   x = PIND;<br />   mask = 1 &lt;&lt; 3;<br />   for&#40;i=0;i&lt;5;i++&#41;&#123;<br />      if&#40;&#40;x &amp; mask&#41; == 0&#41; &#123;<br />         key = i+13;<br />         if&#40;!FzQ_inQue&#40;key&#41;&#41; &#123;<br />            FzQ_Push&#40;key&#41;;<br />            return key;<br />         &#125;<br />      &#125;<br />      mask &lt;&lt;= 1;<br />   &#125;<br />   FzQ_Push&#40;key&#41;;<br />   return key;<br />&#125;</code></pre></div><br /><br />but, was not solution.<br /><br />maybe.. i pressed A and B<br /><br />original was [A][A][A][A][A][A]....<br />this code is [A][B][A][B][A][B]...<br />but i want [A,B][A,B][A,B][A,B]...<br /><br /><br /><br /><br />so, i tried second way.<br /><br />on main function, for usbSetInterrupt function<br />like this:<br /><div class="codebox"><p>Code: </p><pre><code>static uchar    reportBuffer2&#91;4&#93;; //global<br /><br />// on main<br />buildReport&#40;KEY_A&#41;;<br />reportBuffer2&#91;0&#93; = reportBuffer&#91;0&#93;;<br />reportBuffer2&#91;1&#93; = reportBuffer&#91;1&#93;;<br />buildReport&#40;KEY_C&#41;;<br />reportBuffer2&#91;2&#93; = reportBuffer&#91;0&#93;;<br />reportBuffer2&#91;3&#93; = reportBuffer&#91;1&#93;;<br />usbSetInterrupt&#40;reportBuffer2, sizeof&#40;reportBuffer2&#41;&#41;;</code></pre></div><br /><br />but, second way was not the more.<br />second code was not input data. <img class="smilies" src="./../../../images/smilies/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /> <br /><br /><br />guys, how can i ?[/code]<p>Statistics: Posted by Guest — Wed Sep 05, 2007 7:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
