OK I think I found something: http://cocoa.thedizzyheights.com/2010/07/cut-copy-and-paste-in-lsuielement-applications/ http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu
I’m going to try that now. > On Sep 28, 2015, at 3:22 PM, Alex Kac <[email protected]> wrote: > > I guess I need more help than that. Here is what I’ve got: > > NSViewController - with a NIB that has a plain NSView, with an NSTextField in > it. Using an NSPopover, the NSViewController is the content for the popover. > > My only two classes are the NSApplication delegate, and the NSViewController. > Neither -keyDown nor -performKeyEquivalent: get called there. I’m reading > this: > https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html > > From reading there, since I have no NSWindow, and no NSMenu, there is no > key-view loop or NSApplication has nothing to send me the command key > equivalents for. I’m wondering if perhaps I need to use a global monitor for > events while the popover is up, and remove it when its dismissed. > > I don’t mind handling the events myself and processing them - but beyond > using a global monitor for events, I’m not sure how to set them up and get > them in my NSViewController… > >> On Sep 28, 2015, at 2:30 PM, Jens Alfke <[email protected]> wrote: >> >> >>> On Sep 28, 2015, at 1:05 PM, Alex Kac <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> The problem is that without a menu bar, none of the CMD key functions for >>> text fields works now. Stuff like cut, copy paste. So with that in mind, >>> how do I enable that to work? >> >> You may need to capture the key events (possibly in your view’s >> -performKeyEquivalent:) and process them yourself. >> >> —Jens > > Alex Kac - El capitán > > > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > Please 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: > https://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net > > This email sent to [email protected] Alex Kac - El capitán _______________________________________________ Cocoa-dev mailing list ([email protected]) Please 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
