PURPOSE
This macro will create a new Apple Note and open it. The new note can be optionally floated and positioned.
Monterey includes an Apple Notes feature called Quick Note. Since this macro provides similar capability, its value is less obvious for Monterey (or later) users. However, if the Notes Preference Resume last Quick Note is checked, one could use the native Quick Note feature for an ongoing scratchpad and, in tandem, use this macro for collecting information that should be segregated from the Quick Note information.
When using multiple Mission Control Desktop Spaces, the behavior of the Notes app differs based on macOS version. With older versions of macOS (< local_macOSWithModernBehavior), if the active Notes window is open in another Desktop Space, and this macro is triggered, the new note is created in the current Desktop Space. If macOS is newer (>= local_macOSWithModernBehavior), then the new note is created in the same Desktop Space as the active window. For the modern macOS versions, see settings local_MultipleDesktopSpaces and local_AlwaysPreventSpaceChanges.
SETTINGS
local_FloatNewNote : 0|1
If set to 1, the new note will be displayed in a separate window; otherwise in the Notes main browser.
0 = no
1 = yes [default]
local_NotesFolder
The destination Notes folder for the new note. If the folder does not exist, it will be created.
𝗜𝗻𝗯𝗼𝘅 [default]
local_FloatPositionAndSize : X Y W H
Four integers separated by spaces: top-left X position, top-left Y position, Width, Height (all in display percentages)
0 10 50 25 [default]
local_MultipleDesktopSpaces : 0|1
Three groups can change this setting to 0 and ignore the next setting, local_AlwaysPreventSpaceChanges:
-
Those with macOS < local_macOSWithModernBehavior
-
Those NOT using multiple Mission Control Desktop Spaces
-
Those using multiple Desktop Spaces, but do not care if running this macro initiates a switch to another Desktop Space, i.e., the space where Notes is already running
1 [default]
Otherwise, those using macOS = local_macOSWithModernBehavior or newer, use multiple spaces, and want to avoid space changes when Notes is running in another space, can set this to 1.
1 [default]
local_AlwaysPreventSpaceChanges : 0|1
If set to 0 and a Desktop Space change could occur, a prompt will appear with two options: 1) Do Not Quit, and 2) Quit and Reopen. The latter, with the trade-off detailed in the dialog, will ensure that the new note opens is the current Desktop Space. If set to 1, a dialog will not be presented, but the Notes app will behave the same as if Quit and Reopen had been selected.
0 [default]
TESTED WITH
• Keyboard Maestro 10.2
• Ventura beta 13.2 (22D49)/MacBookPro16,1
• Mojave 10.14.16/Macmini6,2
• High Sierra 10.13.6/iMac11,1445
VERSION HISTORY
Click to expand
1.0 - Initial version
1.1 - Modified to accommodate macOS Ventura (v13.x). In this version the Notes app menu item Window>Float Selected Note was changed to Window>Open Note in New Window.
1.2
a) Bug fix: Mistakenly had local_macOSWithFloatMenuItemRenamed in the outside If action; it has been corrected to local_macOSWithModernBehavior.
b) When floating a note on pre-Monterey, added two Forward Delete keystrokes as suggested by @August.
2.0
a) If macOS < local_macOSWithModernBehavior, when a new floated note is created, the first line is set to §Title. As the macro continues, this same string will be used in the actions. Once this window is made active and resized, the leading § will be removed. This is done to distinguish the new note from all existing notes that might have Title as the first line.
b) When local_FloatNewNote = 1, there are actions that bring the main notes browser to the foreground so that it can be minimized. This step would occasionally fail when the Manipulate a Window (Bring Application Window to Front) was used. This was changed to Select or Show a Menu Item.
c) Again when local_FloatNewNote = 1, immediately after the actions mentioned in b), added another Select or Show a Menu Item action to activate the new floated window. This was required to address the scenario when the active Notes window is open in another Mission Control Desktop Spaces, i.e., not the current Desktop Space (and macOS < local_macOSWithModernBehavior),
d) Added an action to ensure that the Notes app is View as List (macOS < local_macOSWithModernBehavior).
e) Added two settings to optimize macro behavior when macOS >= local_macOSWithModernBehavior: local_MultipleDesktopSpaces and local_AlwaysPreventSpaceChanges.
2.1 - Fixed a dialog typo.
2.2
a) Changed the name from New Apple Note to New Note.
b) Changed the name of the inbox from _INBOX to 𝗜𝗻𝗯𝗼𝘅.
c) Improved the Notes is running dialog.
Download: New Note.kmmacros (98 KB)
Macro-Notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System Information
- macOS 13.4.1 (22F82)
- Keyboard Maestro v10.2