• 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
How to make NSImageView respond to keyboard events?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make NSImageView respond to keyboard events?


  • Subject: How to make NSImageView respond to keyboard events?
  • From: Laurent Bertacchini <email@hidden>
  • Date: Thu, 13 May 2004 23:25:57 +0200

Hi,

I'm writing a small picture viewer, and I use a subclass of NSImageView to display the pictures. Everything works fine except that on some occasions (ex. full screen, ...) I'd like it to respond to keyboard events. I tried overriding - (BOOL)acceptsFirstResponder, - (BOOL)becomeFirstResponder, and - (BOOL)resignFirstResponder, so that they return YES, but it doesn't seem to be enough (I only get a beep when I press a key). I know that if I pass YES to setEditable, the keyboard events will be parsed, but it will also trigger the drag & drop feature, and I don't want that.
So, any ideas?

Laurent
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Screen trash with some fonts
  • Next by Date: Re: window resizing events
  • Previous by thread: Re: Screen trash with some fonts
  • Next by thread: Re: How to make NSImageView respond to keyboard events?
  • Index(es):
    • Date
    • Thread