Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > can't get keyDown:(NSEvent *)ne to work...

can't get keyDown:(NSEvent *)ne to work...
Thread Tools
Fresh-Faced Recruit
Join Date: Dec 2002
Status: Offline
Reply With Quote
Dec 27, 2003, 07:00 PM
 
I'm working on the Scribbles tutorial at CocoaDevCentral.com and everything is working except with the keyDown event.

When I press the keys, I get a sound from my computer like a beep sound when I press keys and I never see the keyDown get called.

mouse events are called properly and I can't seem to figure out why the keyDown is not getting called.

Any suggestions would be appreciated.

I working the tutorial in XCode in 10.3.1.

Thanks.
     
Dedicated MacNNer
Join Date: Aug 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Dec 28, 2003, 06:03 PM
 
Originally posted by macaroni:
When I press the keys, I get a sound from my computer like a beep sound when I press keys and I never see the keyDown get called.
Does your view accept first responder? That is, are you returning YES from -acceptsFirstResponder?
Tim Omernick
Engineer, The Omni Group
     
Forum Regular
Join Date: Aug 2003
Status: Offline
Reply With Quote
Dec 29, 2003, 01:07 PM
 
That's most likely the problem you are experiencing.

On a side note, has anybody noticed that XCode occasionally beeps when you type into it's editor window? Then it just stops, all of a sudden. Just wondering if anybody knows what that's all about.
-- Devin Lane, Cocoa Programmer
     
Fresh-Faced Recruit
Join Date: Dec 2002
Status: Offline
Reply With Quote
Dec 29, 2003, 08:34 PM
 
I actually did this as well...

So I decided to make a test project to with a simple custom view to accept first responder and it worked fine.

But with the actual project that I'm working on it didn't. I ended up cleaning my project target and building it again 3 times until for some reason it suddenly worked. I didn't change any code not a single a thing.

Still scratching my head as to why this happened....

Thanks for the reply.!
Originally posted by Tim2 at Omni:
Does your view accept first responder? That is, are you returning YES from -acceptsFirstResponder?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:36 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2