How to use the function keys on your Mac either:
- Press and hold the Function (Fn)/Globe while pressing a function key.
- To change the default behavior of the keys
- Choose Apple menu > System Settings.
- Click Keyboard in the sidebar.
- Click the Keyboard Shortcuts button on the right.
- Click Function Keys in the sidebar.
- Turn on “Use F1, F2, etc. keys as standard function keys”.
Much of this is from Mac keyboard shortcuts
Command
+X
: Cut the selected item and copy it to the Clipboard.Command
+C
: Copy the selected item to the Clipboard. This also works for files in the Finder.Command
+V
: Paste the contents of the Clipboard into the current document or app. This also works for files in the Finder.Command
+Z
: Undo the previous command. You can then pressShift
+Command
+Z
to Redo, reversing the undo command. In some apps, you can undo and redo multiple commands.Command
+A
: Select All items.Command
+F
: Find items in a document or open a Find window.Command
+G
: Find Again: Find the next occurrence of the item previously found. To find the previous occurrence, press Shift-Command
+G
.Command
+H
: Hide the windows of the front app. To view the front app but hide all other apps, pressOption
+Command
+H
.Command
+M
: Minimize the front window to the Dock. To minimize all windows of the front app, pressOption
+Command
+M
.Command
+O
: Open the selected item, or open a dialog to select a file to open.Command
+P
: Open a print dialog so that you can print the current document.Command
+S
: Save the current document.Command
+T
: Open a new tab.Command
+W
: Close the front window. To close all windows of the app, pressOption
+Command
+W
.Option
+Command
+Esc
: Force quit an app.Command
+Space bar
: Show or hide the Spotlight search field. To perform a Spotlight search from a Finder window, pressCommand
+Option
+Space bar
. (If you use multiple input sources to type in different languages, these shortcuts change input sources instead of showing Spotlight. (Learn how to change a conflicting keyboard shortcut.)Control
+Command
+Space bar
orFn
+E
: Show the Character Viewer, from which you can choose emoji and other symbols.Control
+Command
+F
: Use or stop using the app in full screen, if supported by the app.Space bar
: Use Quick Look to preview the selected item.Command
+Tab
: Switch to the next most recently used app among your open apps.
Command
+`
(Grave accent): Switch between the windows of the app you're using.- Screen shots Learn more about screenshots.
Shift
+Command
+5
: In macOS Mojave or later, take a screenshot or make a screen recording.Shift
+Command
+3
: Captures the entire screen and saves it to the desktop.Shift
+Command
+4
: Captures a selection and saves it to the desktop.
Shift
+Command
+N
: Create a new empty folder in the Finder.Control
+Command
+N
: Create a new folder that contains the currently selected items.Command
+,
(Comma): Open settings (preferences) for the front app.
Delete
: Deletes the character to the left, i.e., Linux backspace.Fn
+Delete
: Delete the character to the right, i.e., Linux delete.
These key chords behave different in different apps.
In VS Code, they move both the display and where text is inserted. In some
documents, they seem to move based on document structure. For example, in this
Markdown document, Control
+ down-arrow can move to the last section and, in
that case, pressing these keys a second time move to the bottom of the document.
In Notes, they move what text is displayed but do not move where text is inserted.
Fn
+right-arrow
: In VS Code, this moves the cursor to the end of line but in the Notes app, this displays the end of line but does not change the text insertion point.Fn
+left-arrow
: Depends on the app, Moves the cursor to the beginning of the line.Fn
+down-arrow
: Moves to the bottom of the window or document or, in VS Code and Safari, Page DownFn
+up-arrow
: Moves to the top of the window or document or, in VS Code and Safari, Page Up.
Shift
+Return
Used in Signal and Messages
Settings
> Trackpad
Remember to use both hands. For example, for me, swiping from the left is easier with the left hand. When selecting a large amount of text, it is possible to start the "click drag" with one hand and extend it with the other.
- Set
Click
toMedium
orFirm
. - Enable
Force Click and haptic feedback
. - Set
Look up & data detectors
toForce Click with One Finger
. - Set
Secondary click
(i.e., "right click") toClick with Two Fingers
- Disable
Tap to click
. If this is enabled, a light tap is registered as a click.
Force click is a longish hard press that, if haptic feedback is enabled, gives a distinct "bump" as feedback.
An example of a "data detector" is a dictionary lookup that can appear when a word is selected that is in the dictionary. Sometimes this repeatedly does not work, even for words in the dictionary. And then it starts working.
Enable
Natural scrolling
/Contents track finger movement
Zoom in or out
/Pinch with two fingers
Smart Zoom
/Double tab with two fingers
Rotate
/Rotate with two fingers
- Set
Swipe between pages
toScroll Left or Right with Two Fingers
- Set
Swipe between full-screen applications
toSwipe Left or Right with Three fingers
- Enable
Notification Center
/Swipe left from the right edge with two fingers
- Set
Mission Control
toSwipe Up with Three Fingers
. This shows a set of small views of the currently running applications. Clicking on one brings that application to the foreground. - Set
App Exposé
toSwipe Down with Three Fingers
This exposes the files opened by the current foreground application. Swipe up with three fingers to hide this. - Set
Launchpad
toPinch with thumb and three fingers
- Set
Show Desktop
toSpread with thumb and three fingers
- In most apps (not VS Code), click on the word then
Control
+ click to get suggestions.
- Dictionary lookup can be enabled by turning
System Settings
>Trackpad
>Force Click and haptic feedback
on. To use this:- Three finger, long, hard press on a selected word.
- NB: the three finger press must last long enough to cause the slightly delayed, "bump" feedback.
- This works in VS Code, Safari, and Mail.
Option
+Delete
Deletes highlighted message without advancing to the next message.Command
+Shift
+N
: Refresh mailbox.- Two-finger left or right swipe on a message header exposes actions, like delete, mark as unread, etc.
NB: Something is leaving deleted messages in the inbox. They are marked as read. Wtf?
Control
+ Click on a message: Displays options for tapback, edit message, delete, reply- Enter a line break.
Control
+ Click on a Link: Opens in a new tab- Two finger right swipe in tab: Closes tab
Command
+Z
: Undo close tab- Long press on
+
(new tab) shows recently closed tabs. Clicking on one reopens it. - Two finger swipe left and right on the trackpad are equivalent to the left
and right arrows (
Show the previous page
andShow the next page
).
Option
+Command
+F
: Find and replace.Shift
+Command
+\
: Jump to the matching bracketControl
+G
: Jump to line numberCommand
+K
+S
: Open Keyboard ShortcutsFn
+F1
orCommand
+Shift
+P
: Open CommandControl
+P
: Previous line. Same as the up arrow key.Control
+N
: Next line. Same as the down arrow key.- Page up, page down
VS Code steals the default minimize Command
+ M
. I found no shortcut that
uses only this, but some use it in conjunction with other keys, like Command
+
K
+ M
for "Change Language Mode" and Shift
+ Command
+ M
for "Toggle
Problems".
open --new -a "Visual Studio Code" --args --new-window ~/.bashrc
It is necessary to tell open(1)
to open a new window (--new
) and to tell VS
Code to create a new window --new-window
.
This depends upon displaying the photo in the Preview
app and so does not work
for a photo that is in a shared album.
Interact with text in a photo using Live Text in Preview on Mac
Double click on the picture to open the Preview app.
Control
+ Click on the photo- Click on
Edit With
- Click on
Preview
(NB: you'll see a shortcutCommand
+Return
. It doesn't work.)
Tools
>Text Selection
- Use "drag" to select the desired text
- Copy, e.g., with
Command
+C
Keyboard shortcuts and gestures in Photos on Mac
This only works for a local photo and does not work for a photo in a shared album.
- To add a title or subject, click on the
i
in the tool bar. A window will open. Click insideTitle
orCaption
orKeywords
, and type. Close the window.
Some iOS apps, like Feedly, Netflix, Youtube, etc. are not available for Mac.
For these, visit the page, click on the Share
(up arrow) and click on Add to Dock
. Links that are added to the dock also appear in the Apps folder.
https://code.visualstudio.com/download
Add these extensions
Bash IDE | mads-hartmann.bash-ide-vscode |
Bookmarks | alefragnani.Bookmarks |
C/C++ | ms-vscode.cpptools |
C/C++ Themes | ms-vscode.cpptools-themes |
markdownlint | DavidAnson.vscode-markdownlint |
Rewrap Revived | dnut.rewrap-revived |
Sort JSON objects | richie5um2.vscode-sort-json |
Sort lines | Tyriar.sort-lines |
Spell Right | ban.spellright |
Sign into GitHub.
- macOS will display "Apple could not verify .... is free of malware ..." and
will offer to "Move to Trash". Click
Done
. - Open
System Settins
>Privacy & Security
- At the bottom, under
Security
, you should see the package you tried to install. Click onOpen Anyway
and the click on it again. Then enter your local password (not for the Apple account). - A window should open that lets you install the app, including changing the directory.
Download at https://download.sqlitebrowser.org
See https://github.com/sqlitebrowser/sqlitebrowser/.
https://www.torproject.org/download/
https://signal.org/download/macos/
Existing chats from other devices are not synchronized.
https://www.mozilla.org/en-US/firefox/mac/
A photo cataloging tool I used on Linux
https://www.digikam.org/download/
Installing this requires the same steps as exiftool.
- Garmin Basecamp for Mac
- Garmin Express - Used this to update firmware on Alpha 100 GPS.
- inReach Sync - Updates firmware. Also, syncs contacts and messages set in https://explore.garmin.com/Messages
- Garmin MapInstall
- Garmin MapManager
- Garmin WebUpdater for Mac - This should update the e-collars but gives a warning about running on a Mac.
- Amazon Prime Video
- Orbit
- Plain Paste
- Speedtest
- Strongbox
- After installing it and Firefox, install its Firefox extension by opening https://addons.mozilla.org/en-GB/firefox/addon/strongbox-autofill/ in Firefox.
System Settings
>Touch ID & Password
setUse Touch ID for autofilling passwords
on.System Settings
>Autofill from
>AutoFill & Password
, turnPasswords
off andStrongbox
on, and listStrongbox
inSetup Code In
- Verify that Strongbox is listed under
Login Items & Extensions
>Open at Login
- Swift Playground
- Xcode
Apple wants me to use zsh because it hooks into Apple thingies.
To avoid the annoying warning about zsh when starting bash, put this into
~/.zshenv
:
# See https://support.apple.com/en-us/102360
export BASH_SILENCE_DEPRECATION_WARNING=1
Sometimes Control
+ C
stops working and you'll hear a beep. When this
happens, try Command
+ .
When you exit the shell, Terminal
will stay running. To prevent this, in the
Terminal
settings Profiles
, change "When the shell exits" to "Close if shell
exited cleanly".
Try pointing SQL Lite browser at
database/Photos.sqlite
.
The picture files are in "${HOME}/Pictures/Photos Library.photoslibrary/"
The double quotes are necessary (that, or escape the space).
For one picture, with some edits, there are six files.
See exiftool
output for an example jpeg.
scopes/cloudsharing/data
contains at least some (all?) of the photos from
shared albums.
This command launches the Preview app from the zsh (not bash) command line:
open -a Preview -- "${HOME}/Pictures/Photos Library.photoslibrary/originals/0/0FB91698-EF23-48BF-96A9-F7902A77E118.jpeg
To copy from iPhone to Mac or NAS
PhotoSync – transfer photos on App store
Visit photosync-app.com
for a complete feature list.
Photo Exifer claims to import XMP data to the Photos app. See How to import XMP sidecars to Photos on Mac?
Photo Exifer is compatible with extensible metadata files, supporting XMP files from Apple Photos and JSON files from Google Photos. It allows you to read photo metadata from XMP and JSON files and write it back to the corresponding photos
These use defaults(1)
to "access the Mac OS X user defaults system".
When using the trackpad, and the default configuration, I find it too easy to
accidentally rearrange the dock. Here's a zsh
command to prevent that.
defaults write com.apple.Dock contents-immutable -bool true; killall Dock
defaults write com.apple.Dock contents-immutable -bool false; killall Dock
defaults
can also be used to control whether one can change the docks's
position com.apple.Dock position-immutable
and size
com.apple.Dock size-immutable
.
defaults read com.apple.Dock contents-immutable
Homebrew and MacPorts are ways of getting open source tools running on a Mac. Both are actively maintained.
Here are Apple's ports
MacPorts and their mpstats
tool
installed quickly but the first real package I installed,
shellcheck
,
took tens of minutes because it pulled so many dependencies - 465 packages per
port echo rdepof:shellcheck
- some of which did not have prebuilt binaries.
Thoughts on macOS Package Managers is in favor of MacPorts because it is more consistent with Linux and issues with how the project is run. Notes that Homebrew is sometimes updated more quickly. Though this is old, more recent pages link to it.
Responses to this
Reddit
lean towards Homebrew because it usually carries over with less between MacOS
releases, though some note that can cause more problems than it fixes because
Homebrew depends on the MacOS libraries. Also notes that its refusal to share
/usr/local
can cause problems.
system_profiler SPUSBDataType
Example output with Garmin e-collar attached:
USB:
USB 3.1 Bus:
Host Controller Driver: AppleT8132USBXHCI
Vendor-Specific Device:
Product ID: 0x0003
Vendor ID: 0x091e (Garmin International)
Version: 0.01
Speed: Up to 12 Mb/s
Location ID: 0x03100000 / 1
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
USB 3.1 Bus:
Host Controller Driver: AppleT8132USBXHCI
USB 3.1 Bus:
Host Controller Driver: AppleT8132USBXHCI
ioreg -p IOUSB
lists information about the USB controllers but I can't get it
to display the attached device, as shown above.
How to record the screen on your Mac
- Open the Screenshot app by pressing these three keys together:
Shift
+Command
+5
. - You should see an onscreen toolbar with three controls for capturing a still
image of your screen, followed by these two controls for recording a video of
the screen:
- Record Entire Screen
- Record Selected Portion. You can adjust the selected portion by dragging its borders with your mouse or trackpad.
- Before starting your recording, you can click Options in the toolbar to
change the recording settings:
- To record your voice or other audio with the screen recording, choose a microphone.
- To show a black circle around your pointer when you click, choose Show Mouse Clicks.
- To set a recording timer, choose the number of seconds to wait before recording begins after you click Record.
- To change where the recording will be saved after you stop recording, choose a different “Save to” location. By default, recordings are saved to your desktop.
- To start recording, click the Record button in the Screenshot toolbar.
- To stop recording, click the Stop button in the menu bar, or press Command-Control-Esc (Escape).
- When you see a thumbnail of the recording in the corner of your screen, click it to edit the recording. Or wait for the recording to save to your desktop.
Learn more about using the Screenshot app
- Open QuickTime Player from your Applications folder.
- From the menu bar, choose File > New Screen Recording. Or press
Control-Command-N.
- If you see the onscreen controls described above, screen recording on your Mac is performed by the Screenshot app. Follow the steps in the previous section.
- If you see the Screen Recording window described below, screen recording on your Mac is performed by QuickTime Player. Continue to the next step.
- Before starting your recording, you can click the arrow next to the Record
buttonNo alt supplied for Image to change the recording settings:
- To record your voice or other audio with the screen recording, choose a microphone. To monitor that audio during recording, adjust the volume slider. If you get audio feedback, lower the volume or use headphones with a microphone.
- To show a black circle around your pointer when you click, choose Show Mouse Clicks in Recording.
- To start recording, click the Record buttonNo alt supplied for Image and then
take one of these actions:
- Click anywhere on the screen to begin recording the entire screen.
- Or drag to select an area to record, then click Start Recording within that area.
- To stop recording, click the Stop buttonNo alt supplied for Image in the menu bar, or press Command-Control-Esc (Escape).
- After you stop recording, QuickTime Player automatically opens the recording. You can now play, edit, or share the recording.