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 516

Summary: SDL_EnableUNICODE + SDL_ENABLEAPPEVENTS produce extra system beeps
Product: SDL Reporter: Marc S. Ressl <mressl>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.12   
Hardware: PowerPC   
OS: Mac OS X (All)   
URL: http://www-personal.umich.edu/~mressl

Description Marc S. Ressl 2007-11-15 20:47:50 UTC
I am writing an SDL program which should be portable (that's why I use SDL), but features a customized Cocoa userinterface that uses CMD key shortcuts.

I need to enable SDL_ENABLEAPPEVENTS and SDL_EnableUNICODE. When I do so, application events (triggered with the CMD key) perform their action, but a system beep is also heard.

I found the bug in /src/video/quartz/SDL_QuartzEvents.m. There is an (apparently to me) unnecessary call to interpretKeyEvents:.

The solution would be to remove this call:

    if (SDL_TranslateUNICODE && state == SDL_PRESSED) {
//        [field_edit interpretKeyEvents:[NSArray arrayWithObject:event]];
        chars = [ event characters ];

Thanks
Comment 1 Marc S. Ressl 2007-11-19 09:02:00 UTC

*** This bug has been marked as a duplicate of bug 508 ***