![]() keyboardShortcut(KeyEquivalent("a"), modifiers. ![]() NSPopover logic in NotedApp.swift: MenuBarPopoverApp: App var appDelegateĬlass AppDelegate: NSObject, NSApplicationDelegate. Slightly different implementation, but will do what you want: LaunchBar keeps a history of your clipboard, so you can copy multiple things using the usual keyboard combo - C and then paste them using (for me, I may have changed from the default): hold down. TextEditor in ContentView.swift: TextEditor(text: $userData.note) My app doesn't do this (presumably because it's a popover). Usually, when you open an app, you'd see the app name and the relevant menu options in the top left of the Mac menu bar (next to the Apple logo). I believe it has something to do with the fact that when you click to open the popover, macOS doesn't "focus" on the app. ![]() The copy/paste/cut options still appear in the right-click menu, but I'm not sure why I can't use keyboard shortcuts to access them in the NSPopover. I know TextEditors do support these shortcuts because if I start a new project in XCode and I don't put it in a NSPopover (I just put it into a regular Mac app, for example), it works. ![]() The app is centred around a TextEditor (new in Big Sur), but that TextEditor doesn't seem to respond to the typical Cmd + C/V/X keyboard shortcuts for copying, pasting, and cutting. I'm making an app for the macOS menu/status bar in SwiftUI that when clicked on, opens a NSPopover.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |