beeps in response to key presses
beeps in response to key presses
- Subject: beeps in response to key presses
- From: Steve Checkoway <email@hidden>
- Date: Tue, 25 Oct 2005 18:49:56 -0700
If nothing responds to a key down press, a beep is emitted. I'm
working on a game and I am handling user input at a lower level
(using the HID api). Currently, I am using SDL for OpenGL (although I
hope to remove it shortly) and when the game is windowed (i.e. not
fullscreen), I can silence the beeps using a subclass of NSWindow
that responds to keyDown: (and does nothing) and then use my subclass
to poseAsClass:[NSWindow class]. This takes care of about a third of
the beeps.
The other big issue is when the game is in fullscreen, pressing
buttons causes beeps. I tried doing the same trick with a subclass of
NSOpenGLView, but that didn't work. Now that I think about it, it
makes sense that it didn't work.
The first thing that I tried which didn't work at all was a subclass
of NSApplication since it is a NSResponder.
The final set of beeps I'd like to eliminate is modified button
presses. If I type cmd-Q, it beeps since there is no menu item
corresponding to that. This is due to it being originally written
using SDL.
The above attempts and partial solutions are all hacks. There must be
a way to capture all key down events in the application that were not
handled anywhere else; however, I do not know how to do it. Any
advice or pointers to docs would be much appreciated.
- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden