<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>4.2b2 keyb bug</title>
		<link>http://www.allegro.cc/forums/view/484193</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 05 May 2005 14:32:13 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>scancodes are wrong.<br />in 4.1.18 /examples/exkeys   &#39;alt-a&#39; and &#39;a&#39;  are different scan codes.<br />in 4.1.20b2  /examples/exkeys  shows them returning the same scan code.</p><p>winXP sp1<br />msvc7.1
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 25 Apr 2005 15:11:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The BIOS in real mode has a similar function to return scancode and ascii value, and the scancode is always the same for a given key, e.g. just the &#39;a&#39; key returns (i forget the specific values, stick in some randoms here) 0x2361 and Alt-A returns 0x2300, Control A would be 0x2301.</p><p>However, I was playing with the excamera example and noticed that pressing the Y key, shifted or not, always increased the &quot;altitude&quot;.</p><p>Then I tried a short little test proggie with something like:</p><p>while(1)<br />  {<br />   textprintf_ex(screen,...,&quot;%X&quot;,keyshifts);<br />   if(key[KEY_ESC]) break;<br />  }</p><p>and NONE of the control-shift-alt keys changed it from 0x200, although pressing the Shift Lock toggled it to 0x600.  In the djgpp allegro, it gave different values according to which of the three were pressed.</p><p>The exkeys example does show the alt etc. keys being pressed, but it has a thing that draws the keypresses on the screen within the key callback (it also mentions that it&#39;s an ugly hack that you shouldn&#39;t use)</p><p>  EDIT:  Oops, forgot to mention that these were all 4.20b2 <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Sat, 30 Apr 2005 04:31:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll look at this. The Alt-key one should be fixed, but seems I broke the keyshifts with it (*sigh*).</p><p>Edit:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
scancodes are wrong.<br />in 4.1.18 /examples/exkeys &#39;alt-a&#39; and &#39;a&#39; are different scan codes.<br />in 4.1.20b2 /examples/exkeys shows them returning the same scan code.
</p></div></div><p>

In exkeys, I press a and get: 0x0161<br />I press Alt-a, I get: 0x100</p><p>Not sure what to do.. it may be that windows doesn&#39;t always assign the same values to the Alt key or something..</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
and NONE of the control-shift-alt keys changed it from 0x200, although pressing the Shift Lock toggled it to 0x600. In the djgpp allegro, it gave different values according to which of the three were pressed.
</p></div></div><p>

I tried in exkeys, one of the test modes prints the various control key states.. it all works as it should here.</p><p>I assume, you are both using US keyboard layout? And which OS?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Sat, 30 Apr 2005 04:47:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Windows 98 second edition, US keyboard, mingw 3.4.1 (?)</p><p> EDIT:  Also I seen that the exkeys thing had a hack to draw to screen<br />in the keyboard callback, so it&#39;s not going through the &quot;proper channels&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 02 May 2005 06:02:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i use a standard US keyb layout, WinXPSp1.. <br />i also emailed more probs on this matter on [AD] but have seen it take upto 24hrs for the post to arrive, is sourceforge getting worse?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 02 May 2005 09:40:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>EDIT: Also I seen that the exkeys thing had a hack to draw to screen<br />in the keyboard callback, so it&#39;s not going through the &quot;proper channels&quot;
</p></div></div><p>

That&#39;s just for the real-time update of the key-presses. I know it&#39;s not the best thing to do something like this in an example.. ideally should move it into the &quot;test&quot; directory. Anyway, the rest of the program (the left half <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />) should be completely un-affected by it.</p><p>So, to be sure - in the 3rd (or 4th? forgot) test in exkeys, where it tells the state of Alt, Control, Shift (by reading key_shifts), what does it print for you? Only the ASCII of the letters? Do Numlock, Scrolllock, Capslock work? (should also be displayed in the same test).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
i use a standard US keyb layout, WinXPSp1..<br />i also emailed more probs on this matter on [AD] but have seen it take upto 24hrs for the post to arrive, is sourceforge getting worse?
</p></div></div><p>

Replied on [AD] (and SF isn&#39;t getting worse, but also not better) Oh, and for you, key_shifts works, right?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 02 May 2005 13:05:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just ran home &amp; back to test (puff, puff), I forgot to test the control,alt, but it did NOT print &#39;shift&#39; etc.  The DJGPP compiled 4.20b2 did print &#39;shift&#39;.</p><p>Perhaps you need to drop support for 7 year old OS&#39;es?  We fossils can always use 4.1.8 etc. I think I&#39;ll start a new thread about this in the off-topic forum...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 05 May 2005 04:33:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Perhaps you need to drop support for 7 year old OS&#39;es? We fossils can always use 4.1.8 etc. I think I&#39;ll start a new thread about this in the off-topic forum...</p></div></div><p>
No. We will not drop DOS support for 4.2 at this stage of development.<br />Nor would it help with fixing a bug in the Windows version. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 05 May 2005 04:39:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think he means Windows 98.. and we won&#39;t drop support for that in 4.2.0. If the key[] array is used, are KEY_LSHIFT and KEY_RSHIFT detected?</p><p>I&#39;ll try to make a program which prints the windows keystate information, then you can run it and tell me what it does under win98 (well, probably only well get around to it in a week from today). Should be simple to fix this in any case.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Thu, 05 May 2005 05:32:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m about to run out of time on my landladys computer (internet access) but the KEY_LSHIFT &amp; KEY_RSHIFT did change to -1 when pressed, 0 unpressed.  Gotta go for a couple days.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 05 May 2005 06:29:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Elias said:</div><div class="quote"><p>I&#39;ll try to make a program which prints the windows keystate information, then you can run it and tell me what it does under win98 (well, probably only well get around to it in a week from today). Should be simple to fix this in any case.
</p></div></div><p>
Elias: can you give me a quick idea on what sort of change would be needed? I may be able to test it before then.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 05 May 2005 11:16:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, in src/win/wkeybd.c, look for the function update_shifts. For some reason, on win98, it doesn&#39;t work. The passed parameter &quot;keystate&quot; simply is an array of 256 virtual keys returned by GetKeyboardState.</p><p>Probably I&#39;m doing something wrong there.. but it works in XP. My idea is, somehow print out that complete 256 keys in a test program.. and find out what happens on win98 for the shift key..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Thu, 05 May 2005 14:32:13 +0000</pubDate>
	</item>
</rss>
