• 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: Background Helper app - brings up UI element, needs CMD-C/X/V
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background Helper app - brings up UI element, needs CMD-C/X/V


  • Subject: Re: Background Helper app - brings up UI element, needs CMD-C/X/V
  • From: Alex Kac <email@hidden>
  • Date: Mon, 28 Sep 2015 15:29:09 -0600

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@hidden> 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@hidden> wrote:
>>
>>
>>> On Sep 28, 2015, at 1:05 PM, Alex Kac <email@hidden <mailto:email@hidden>> 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@hidden)
>
> 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:
>
> This email sent to email@hidden


Alex Kac - El capitán


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Background Helper app - brings up UI element, needs CMD-C/X/V (From: Alex Kac <email@hidden>)
 >Re: Background Helper app - brings up UI element, needs CMD-C/X/V (From: Jens Alfke <email@hidden>)
 >Re: Background Helper app - brings up UI element, needs CMD-C/X/V (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Background Helper app - brings up UI element, needs CMD-C/X/V
  • Next by Date: Re: Background Helper app - brings up UI element, needs CMD-C/X/V
  • Previous by thread: Re: Background Helper app - brings up UI element, needs CMD-C/X/V
  • Next by thread: Re: Background Helper app - brings up UI element, needs CMD-C/X/V
  • Index(es):
    • Date
    • Thread