• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: When does -[NSWindow sendEvent:] beep?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When does -[NSWindow sendEvent:] beep?


  • Subject: Re: When does -[NSWindow sendEvent:] beep?
  • From: David Catmull <email@hidden>
  • Date: Tue, 20 Feb 2007 14:43:31 -0800

On Feb 20, 2007, at 2:22 PM, Sean McBride wrote:
NSResponder has a special method for the arrow keys (moveLeft:), that's
probably got something to do with it. Try breaking on it. Or on
interpretKeyEvents:.

I tried both -[NSResponder moveUp:] and moveToBeginningOfDocument:, but neither one resolved. -[NSResponder interpretKeyEvents:] did resolve, but the breakpoint was never hit.


So I added moveUp: to my view, and that does get called (even though my event has the command key down, which ought to trigger moveToBeginningOfDocument):

#0 0x006b10a8 in -[MyView moveUp:] at MyView.mm:245
#1 0x93944ac8 in -[NSWindow _processKeyboardUIKey:]
#2 0x93767e84 in -[NSWindow sendEvent:]
#3 0x937108d4 in -[NSApplication sendEvent:]

I thought methods like moveUp only get called if I call interpretKeyEvents: from my keyDown: method. I sure hope I'm not going to have to implement every one of those move methods to make sure I get all arrow key events.

Why does this happen with my programatically-generated events and not with real user events? Those go directly to my keyDown method, which is what I want. I have my own arrow key logic.

--
David Catmull
email@hidden
http://www.uncommonplace.com/

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >When does -[NSWindow sendEvent:] beep? (From: David Catmull <email@hidden>)
 >Re: When does -[NSWindow sendEvent:] beep? (From: "Sean McBride" <email@hidden>)
 >Re: When does -[NSWindow sendEvent:] beep? (From: David Catmull <email@hidden>)
 >Re: When does -[NSWindow sendEvent:] beep? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: When does -[NSWindow sendEvent:] beep?
  • Next by Date: Re: When does -[NSWindow sendEvent:] beep?
  • Previous by thread: Re: When does -[NSWindow sendEvent:] beep?
  • Next by thread: Re: When does -[NSWindow sendEvent:] beep?
  • Index(es):
    • Date
    • Thread