We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 454 - right side of keyboard doesn't work
Summary: right side of keyboard doesn't work
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS Classic
: P1 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-11 06:45 UTC by Gregory Smith
Modified: 2007-07-15 07:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Smith 2007-07-11 06:45:31 UTC
Something changed between 1.2.11 and 1.2.12 pre-release (probably in the Mac OS X shared event handling?) but when I drop in an SDL library compiled from SDL-1.2 in SVN, suddenly none of the keys on the right side of my keyboard work in-game. So, at the menu screen, I can type Q and the game will quit, but P does not bring up preferences, and space bar doesn't skip movies.

I don't have time right now to determine whether 
a) events are being generated, with bogus keysyms in them, or
b) events aren't even being generated for those keys

but maybe someone eyeballing deltas since 1.2.11 can find something out of the ordinary? I will have time to look at it later, but not until after this weekend, so I wanted to get this reported before Sam builds 1.2.12

I haven't tested this in 1.2.12 pre-release for Mac OS X, but I assume this wouldn't have gone unnoticed there!
Comment 1 Ryan C. Gordon 2007-07-12 00:26:07 UTC
Gregory,

Were you working from the latest Subversion when you made this comment?

   http://bugzilla.libsdl.org/show_bug.cgi?id=431#c12

(If so, we only have to check back to that point for changes.)

Also, do you know if you were using the macdsp or macrom video target when this failed?

Thanks,
--ryan.

Comment 2 Sam Lantinga 2007-07-12 01:17:55 UTC
Also, just to be clear, you built SDL 1.2 from SVN from source on Mac OS 9 with MPW or CodeWarrior, and dropped the shared object into an existing application, right?
Comment 3 Gregory Smith 2007-07-12 04:40:42 UTC
The keyboard was broken at that point as well. "Works great" only referred to the gamma ramps.

I updated SVN, built the shared library with CodeWarrior 10 (which only runs in Mac OS X), and dropped it in place of my SDL 1.2.11 shared library for testing in Mac OS 9.

I believe the bug occurred with both macdsp and macrom, but I will have to try again to be sure.
Comment 4 Gregory Smith 2007-07-15 06:21:55 UTC
I retried with macdsp and macrom, neither work.

I added a print statement to my event handler--it appears no keydown event is being generated.
Comment 5 Gregory Smith 2007-07-15 06:37:40 UTC
Another update: reverting src/video/maccommon/SDL_macevents.c to revision 2608 fixes the problem. I'm not sure I understand why, but it's some problem with change 3039.
Comment 6 Sam Lantinga 2007-07-15 06:58:09 UTC
Oh jeez, I see the problem.  Fixing it now..
Comment 7 Sam Lantinga 2007-07-15 07:06:50 UTC
I think this is fixed by revision 3286.  I wasn't able to test it, can you try it out, and reopen the bug if it's not fixed?

Thanks!
Comment 8 Ryan C. Gordon 2007-07-15 07:15:06 UTC
No, this was my bug...KeyMap is an array of Uint32 elements, and I cast it to Uint8, so we end up only comparing the first quarter of the arrays for differences.

Should actually be fixed in svn revision #3287 (but please check!).

--ryan.

Comment 9 Sam Lantinga 2007-07-15 07:20:33 UTC
Hah, I just tried to check in the same fix, byte for byte. Yes, this fixes it. :)