Skip to content

Instantly share code, notes, and snippets.

@sojeri
Last active August 22, 2024 03:30
Show Gist options
  • Save sojeri/9898254abef2d184c659 to your computer and use it in GitHub Desktop.
Save sojeri/9898254abef2d184c659 to your computer and use it in GitHub Desktop.
How do I get my Mac to act like a PC?!

On switching to a Mac:

One of my biggest concerns about getting into Ada Developers Academy was the technology requirement: a late model MacBook. I've been a staunch Windows and Linux user for years, and I enjoy working with basic tools like keyboard shortcuts that behave the way I expect them to. Until the switch, I had considered keyboard shortcuts as solid and standardized as screwdrivers.

The keyboard shortcuts between Windows and Linux are pretty similar, perhaps because I've always run Linux on computers that were built for Windows. I could swap between computers easily, using the same keyboard shortcuts over and over. Ctrl+V here was the same as Ctrl+V there, Alt+Tab was Alt+Tab. Happy sigh. That is not what happened when I opened my MacBook!

In one application, Ctrl+V hid the mouse pointer. In another, it hid the pointer and acted like Page Down. A few of the keys had similar names but different behaviors, and some keys were missing entirely. I caught on pretty quickly that I could use Command instead of Ctrl or Alt to run most of my shortcuts, but some of them still didn't work. I had to dig deeper. I had to figure out what it would take to take this gibberish ⌘⇧F thing and turn it back into my magical F11 button, which was stuck decreasing the volume of sound instead. And so:

Here are some Mac keyboard shortcuts I've figured out to recreate behaviors from PCs. These were tested on a 2014 MacBook running OS X Yosemite.


Overview



Learning the Menu Symbols


Whenever you open a menu, it will use these symbols to show you which keyboard shortcuts you can use to run the menu option at hand. If you're as into keyboard shortcuts as I am, I recommend making a few flashcards to learn these. I thought they were really weird at first, and flashcards were a quick and easy method for me to test whether I'd learned the symbols correctly.

Button Mac Symbol How I Remember It
Command Ah, here's where I left those four robots I can command to open menus / do other computer stuff for me.
Option Sliding down a bookcase lined with options & picking the first one that looks good.
Control The magic button I need to press to gain control of a robot.
Shift Hey, you short lowercase letter, come up here!
Caps Lock And stay up! Here's a box to help. You can stand on it. :)


Confusing Default Behaviors


Function Keys

By default, these respond backwards to Window/Linux behaviors. Without the Function (Fn) key, they will perform the depicted functions (eg, mute, change brightness), and you must press the Fn key to get the regular F1/F2/etc behaviors. Regular F1/F2/etc behaviors, however, are few and far between.

  • You can toggle this back to Windows/Linux default by going into your System Preferences, opening Keyboard, and checking the box next to Use all F1, F2, etc. keys as standard function keys.

Shift+Tab

In text editors, this does not undo the tab. I have not yet found a way to restore this functionality. If you know, please tweet me [@drvonnjerryxlii][dt]!

Page Up, Page Down, Home, End

These keys aren't even on the keyboard, but their behaviors can be replicated with keyboard shortcuts.

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Page Up Shift + Space Bar or Function/Option + Up Arrow ⇧{Space} / Fn↑ / ⌥↑
Page Down Space Bar or Function/Option + Down Arrow {Space} / Fn↓ / ⌥↓

I found Page Up and Page Down behaviors to be especially inconsistent. In some applications, like web browsers, you can scroll up and down the other traditional PC way with the space bar & the shift key. However, that won't work in apps like text editors. Sometimes Option + Up/Down Arrow will work, and sometimes that will move the line of text you're on up and down. Try Function + Up/Down Arrows in that case! Until you get a feel for your particular apps, I recommend trying Option + Up/Down Arrow first, because it moves the cursor and is a comfortable, one-handed shortcut. Function + Up/Down Arrows often just moves the scroll bar, which is not helpful if you're editing text.

In comparison, Home and End are much easier to reproduce! These are much more consistent across applications:

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Home Command + Left Arrow ⌘←
End Command + Right Arrow ⌘→
Top of Page (PC: Ctrl + Home) Command + Up Arrow or Option + Up Arrow ⌘↑ / ⌥↑
Bottom of Page (PC: Ctrl + End) Command + Down Arrow or Option + Down Arrow ⌘↓ / ⌥↓

Using an External Keyboard

If you use an external, PC-style keyboard or mouse, you may find a few discrepancies:

  • The mouse will default to Mac-standard settings, which means you might need to scroll the opposite way with your scroll button. Newer PCs are shipping with software that interprets mice this way already, so you may already be used to this behavior.
External PC Keyboard Key How It Behaves
Control Control!
Windows Command
Alt Alt / Option
Right-click / Menu Does nothing
Escape Cancels out of active window / element or cancels next character
Insert Opens Help dialog
Delete Delete! <3
Page Up/Down Moves view up/down one page, but does not move cursor
Home/End Jumps to top/bottom of document, but does not move cursor
Windows + Home/End Jumps with cursor to top/bottom of document
Num Lock Does nothing
10-Key Enter Does nothing


Default Keyboard Shortcuts


Most keyboard shortcuts switch from Ctrl + letter to Command + letter (⌘ + letter). I've found a few exceptions which you'll find listed below. Once you get used to these, some of them are more intuitive. For example, the Help function is called by pressing Command and the question mark key (⌘? or ⌘⇧/).

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Help Command + Shift + / (Command + ?) ⌘⇧/ (⌘?)
Delete Function + Delete or Control + D Fn{Del} / ⌃D
Undo Command + Z ⌘Z
Redo (PC: Ctrl + Y) Command + Shift + Z ⌘⇧Z
Quit Application (PC: Alt+F4) Command + Q ⌘Q
Shut Down (PC: Desktop, Alt+F4 or Windows + U + U) Command + Shift + Q ⌘⇧Q


Editing & Browsing Text


Editing Text

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Cut Command + X ⌘X
Copy Command + C ⌘C
Paste Command + V ⌘V
Delete Function + Delete or Control + D Fn{Del} / ⌃D
Undo Command + Z ⌘Z
Redo (PC: Ctrl + Y) Command + Shift + Z ⌘⇧Z
Find Command + F ⌘F
Find Next Command + G ⌘G
Replace Command + H ⌘H

Watch out for that Replace shortcut! It does not open the Find & Replace dialog; it performs the Replace operation.

Browsing Text

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Page Up Shift + Space Bar or Function/Option + Up Arrow ⇧{Space} / Fn↑ / ⌥↑
Page Down Space Bar or Function/Option + Down Arrow {Space} / Fn↓ / ⌥↓
Home Command + Left Arrow ⌘←
End Command + Right Arrow ⌘→
Top of Page (PC: Ctrl + Home) Command + Up Arrow or Option + Up Arrow ⌘↑ / ⌥↑
Bottom of Page (PC: Ctrl + End) Command + Down Arrow or Option + Down Arrow ⌘↓ / ⌥↓
Move Cursor One Word (PC: Ctrl + ←/→) Option + Right/Left Arrow ⌥← / ⌥→

Browsing Menus & Applications

Browsing menus by keyboard is a bit clunkier on Mac than it is on Windows and Linux. There are no magic letters, so you just have to start typing the menu options. It worked best for me to type the first letter and then use the arrow keys.

For browsing the dock, I highly recommend using the arrow keys. It only seems to register the first letter, so if you have two programs pinned that start with the same letter, you won't be able to access both. I found the letters most useful for jumping farther down the dock without having to manually browse down with the arrow keys.

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Full Screen (PC: F11) Command + Shift + F ⌘⇧F
Switch Application (PC: Alt+Tab) Command + Tab ⌘{Tab}
Switch Window (PC: Alt+Tab) Command + ` ⌘`
Close Window/Tab (PC: Ctrl+W) Command + W ⌘W
Quit Application (PC: Alt+F4) Command + Q ⌘Q
Shut Down (PC: Desktop, Alt+F4 or Windows + U + U) Command + Shift + Q ⌘⇧Q
Browse Menu (PC: Alt) Control + F2 ⌃F2
Browse Dock Control + F3 ⌃F3
Toggle Tab Behavior Control + F7 ⌃F7

The Tab key by default does not toggle through menus or buttons, only text boxes and lists. You can restore this standard behavior to more traditional Tab functionality with a keyboard shortcut, which means you can also toggle back and forth between the new & old behaviors. If you don't enable this, you won't be able to Tab up to the address bar. And, yes, Shift+Tab works properly in this context.

Here's how to make the change manually:

  • Go into System Preferences and open the Keyboard settings. Under the Shortcuts tab, you will find a setting called Full Keyboard Access. To restore full Tab browsing functionality, click the radio box next to All controls.

Taking Screenshots

Screenshots on a Mac are very cool. By default, they save a file to the desktop. If you add Control (⌃) to the shortcut, the screenshot will be copied to the clipboard instead.

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Print Screen (full screen, saved to desktop) Command + Shift + 3 ⌘⇧3 (⌘#)
Print Screen (full screen, copied to clipboard) Control + Command + Shift + 3 ⌃⌘⇧3 (⌃⌘#)
Print Screen (select area, saved to desktop) Command + Shift + 4 ⌘⇧4 (⌘$)
Print Screen (select area, copied to clipboard) Control + Command + Shift + 4 ⌃⌘⇧4 (⌃⌘$)
Print Screen (application window, PC: Alt + Print Screen) Command + Shift + 4, Space-bar, Click on Window ⌘⇧4 (⌘$), {Space}, Click on Window


Creating Your Own Keyboard Shortcuts


There might be applications that will do some or all of this for you, but I opted to make the changes manually. Some function keys were easier to reprogram than others. You'll need to open System Preferences and go into Keyboard settings. In the Shortcuts tab, check out your options in the list on the lift. It should say things like Launchpad & Dock, Mission Control, and Keyboard. Click on App Shortcuts at the bottom. Now you can customize your own shortcuts!

To create a shortcut, click the + below the right options list. You'll see right away that you can choose between creating a shortcut for all applications or just for individual ones. The next thing you'll see is a field that asks for the Menu Title. To create a shortcut, all you have to do is find the menu option and type exactly what it says into this field. Finally, click or tab over to the Keyboard Shortcut field, and press the shortcut you'd like this functionality to be associated with. Hit the Add button, and you're finished. It should work now. Try out your new keyboard shortcut and make sure it works right!

Unfortunately, not all applications use the same menu options for the same functions, so sometimes you may have to create multiple shortcuts to add the functionality you are looking for. For example, to restore the F11 / Full Screen functionality to my Macbook, I had to create four separate entries in the Shortcuts creator. For restore the F1 / Help dialog functionality, I had to create a separate shortcut for every application. So keep this in mind! Some things are easier to create as shortcuts than others.


Restoring Default PC Function Key Behaviors


I haven't worked these all out yet.

  • Help (F1):
    This one is a bit of a nightmare. Using my method, you'll have to change it for each individual application and then add it again every time you install a new app. This happens because I have not found a way to use a wildcard or variable name in a keyboard shortcut, and the menu option for opening the help dialog for each program is usually its full name (eg, Google Chrome) plus Help (eg Google Chrome Help). You do not have to actually do this for every application. You could just set the shortcut for apps that you use more often. I wanted the more universal feel of the traditional F1 functionality, so I opted to set it for every app.

    • These are all set to individual applications and F1.
    • Note that Finder is actually: Mac Help.
  • Refresh (F5):
    Note: if you map this to F5, Command + R (⌘R) will stop working.

    • Reload This Page
    • Reload Page
  • Force Refresh (⌥F5):
    (⌘F5 is more comfortable, but that opens the VoiceOver accessibility feature.)

    • Force Reload This Page
    • Force Reload Page
  • Full Screen (F11): This one took four Shortcut entries to simulate the original behavior. They are all set to All Applications and F11.

    • Enter Presentation Mode
    • Exit Presentation Mode
    • Enter Full Screen
    • Exit Full Screen


Masterlist of Shortcuts


See also this page on the Apple website.

Behavior / PC Key Mac Keyboard Shortcut In Symbols!
Cut Command + X ⌘X
Copy Command + C ⌘C
Paste Command + V ⌘V
Delete Function + Delete or Control + D Fn{Del} / ⌃D
Undo Command + Z ⌘Z
Redo (PC: Ctrl + Y) Command + Shift + Z ⌘⇧Z
Find Command + F ⌘F
Find Next Command + G ⌘G
Replace Command + H ⌘H
Page Up Shift + Space Bar or Function/Option + Up Arrow ⇧{Space} / Fn↑ / ⌥↑
Page Down Space Bar or Function/Option + Down Arrow {Space} / Fn↓ / ⌥↓
Home Command + Left Arrow ⌘←
End Command + Right Arrow ⌘→
Top of Page (PC: Ctrl + Home) Command + Up Arrow or Option + Up Arrow ⌘↑ / ⌥↑
Bottom of Page (PC: Ctrl + End) Command + Down Arrow or Option + Down Arrow ⌘↓ / ⌥↓
Move One Word (PC: Ctrl + ←/→) Option + Right/Left Arrow ⌥← / ⌥→
Help Command + Shift + / (Command + ?) ⌘⇧/ (⌘?)
Browse Menu (PC: Alt) Control + F2 ⌃F2
Browse Dock Control + F3 ⌃F3
Toggle Tab Behavior Control + F7 ⌃F7
Full Screen (PC: F11) Command + Shift + F ⌘⇧F
Quit Application (PC: Alt+F4) Command + Q ⌘Q
Shut Down (PC: Desktop, Alt+F4 or Windows, U, U) Command + Shift + Q ⌘⇧Q
Print Screen (full screen, saved to desktop) Command + Shift + 3 ⌘⇧3 (⌘#)
Print Screen (full screen, copied to clipboard) Control + Command + Shift + 3 ⌃⌘⇧3 (⌃⌘#)
Print Screen (select area, saved to desktop) Command + Shift + 4 ⌘⇧4 (⌘$)
Print Screen (select area, copied to clipboard) Control + Command + Shift + 4 ⌃⌘⇧4 (⌃⌘$)
Print Screen (application window, PC: Alt + Print Screen) Command + Shift + 4, Space-bar, Click on Window ⌘⇧4 (⌘$), {Space}, Click on Window

That's all I have for now. I might do a follow-up post in a few weeks after I've gotten more comfortable with my new laptop -- if I have time after class. As always, feel free to tweet me any comments, questions, or feedback.

--[@DrVonnJerryXLII][dt], Stardate 2015/4/27 [dt]: https://twitter.com/drvonnjerryxlii/ "Tweeeeeeeeeet!"

@geeksam
Copy link

geeksam commented Apr 28, 2015

Nice! (By the way, not that it matters, but you appear to have typo'd the word "keyboard" as "keyobard". Unless maybe it was a musical reference? :D)

Another keystroke I find useful is Cmd+, (command, comma). This isn't universal, but in most apps, it brings up the Preferences dialog (if there is one).

A few additional suggestions...

=== Window Switching

I first used OSX about 12 years ago; I remember being especially confusticated by the different behavior of Cmd+Tab versus Alt+Tab. My muscle memory insisted that since it was the same keystroke, it should behave the same way (i.e., cycle through all open windows, not through all open apps.) I've since adjusted to using Cmd+Tab to get to the app I want, followed by Cmd+` to get to the window I want in the app, but it took a lot of retraining.

There is an app called Witch that approaches the old Windows behavior I was used to.

=== Window Layout

The same developer also provides Moom, a window-management app that I find absolutely indispensable. Its grid layout lets you quickly tile windows, and you can set up as many keyboard shortcuts as you can stand for specific preset window positions.

=== Mouse Scrolling

The free Scroll Reverser app allows you to selectively invert the scrolling direction on a per-[type-of-]device basis. I use it to enable "natural" scrolling with the trackpad, but the old mouse wheel behavior I'm used to,

=== Other Niceties

A few other apps I always install on a new Mac:

  • FlyCut provides copy/paste history (warning: this can leave sensitive info hanging around).
  • Fantastical puts a small pop-up calendar in the menu bar, and has some rather nice parsing abilities for quickly adding stuff to your calendar.
  • SlimBatteryMonitor adds a customizable menu bar icon to indicate battery status.
  • Shush is an absolute necessity for video conferencing. (I'm willing to reimburse other people the $5 if only they'll use it when they're in a Hangout with me!)
  • http://www.alfredapp.com/ is an app launcher with some other useful tricks. (I don't find it quite as useful as Quicksilver used to be, but on the other hand it's still supported.)
  • http://www.macbartender.com/ will let you hide the menu bar icons of all the crap you have to have running, but don't necessarily want to see all the time. (Also, since app menus expand from the left and the menu bar expands from the right, the two can collide on smaller screens.) This is especially useful if you use all the other stuff in this list. ;)
  • Skitch has a convenient UI for taking screenshots and applying basic annotations to them. It can be used without an Evernote account; I usually grab a section of the screen, rename the file, and then drag the file icon at the bottom out to the desktop. Then I have an image I can drag into Tweetbot, Slack, email, etc.

=== One Dev Tool You Shouldn't Live Without

GitX is an extremely useful and fast GUI for interacting with Git. Some of my favorite features:

  • If you uncheck "Watch for changes in repositories", it will force you to hit Cmd+R to (R)efresh your view of your Git history. This may not sound like much of a feature, but it's one of the ways I leveled myself up with Git. See: http://think-like-a-git.net/sections/experimenting-with-git/use-your-targeting-computer-luke.html
  • Commit view makes it much easier to go back through a big ball o' WIP (Work In Progress) and extract individual related changes, so you can build small, cohesive commits after the fact. This is basically git add --patch, but in a GUI so you can jump around more easily.
  • You can selectively stage or unstage individual chunks, or even single lines within a chunk. (In Commit View, click on individual lines or click-and-drag across a range of lines, then click the "stage" or "unstage" button that appears on the right.)
  • Tree View allows you to see the entire contents of a file at any point in your Git history. I don't use this frequently, but it's occasionally very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment