The consistency of macOS keyboard shortcuts is one of the main reasons I have huge problems switching to Linux or Windows. Despite the non-trivial amount of tweaking and customization, I could never achieve the same level outside of macOS.
Just to name a few:
- CMD+left/right: start/end of line
- CMD+up/down: start/end of file
- CMD+Shift+arrows: corresponding selection
- Alt+left/right: word movement
- Alt+Shift+arrows: corresponding word selection
- CMD+a: select all
- CMD+1,2,3: switch between tabs in browsers/iterm/IDEs/editors
(surprisingly and infuriatingly, this does not apply to native macOS tabs; e.g. in Finder Cmd+1/2/3 changes the view, but not tabs)
All that + the fact that clipboard, undo/redo, app and windows switching are ALL done via CMD makes it truly a modern hyper button. And you still have Control for Emacs bindings, which also work in most Cocoa text fields.
If you're interested, this [1] is one of the best attempts to bring macOS keybindings to Linux (in particular, Elementary OS). It's a set of settings for Autokey [2].
There is also Kinto [3], which solves one particular problem: copy-paste from terminal with consistent shortcuts.
Not sure how different this is from Windows. Use home/end for start of line or ctrl+page up/page down to go to start of document. Ctrl+left/right moves by words. Holding shift selects while doing any of these. Ctrl+backspace/delete to delete by word instead of character. Ctrl+a to select everything. Ctrl+1,2,3 select tabs, Windows+1,2,3 selects apps. The main advantage I see on Mac is the separate ctrl/cmd keys that let you use ctrl+c/v for unix terminals. Other than that, I think it's whatever you're used to.
Of course some laptops don't have end/home/page up/page down keys and you have to avoid those.
It's not just that some laptops don't have them, it's also that they're always in a different place. Every time I use windows, I need to look at the keyboard to find home, end, etc. On any Mac I use I don't have to search.
Windows key doesn't do any of the cursor move commands and 'ctrl' consistently does the "move in a bigger block than without ctrl" thing. Shift consistently adds selection to that. There's different choices than on macs but it seems equally consistent, when starting with a keyboard with the additional movement keys (home/end/pagedown/pageup).
This is consistency in UX is what keeps me from switching to linux full-time for my personal rig.
I would assume the keyboard UX would be a low-lying fruit. I'm hoping someone with deep knowledge about linux can help me understand what is stopping various distros from simply copying the mac keyboard layout. Replace 'cmd' with the 'super' key and setup the key combinations to match macOS. That way they're consistent whether you're in a GUI application or the command-line.
Is it that the super key is not available on every computer? Or are these shortcuts protected by some sort of a copyright? Kinto seems to work by intercepting signals and reinterpreting them, then why not have the X keyboard component recompiled with a macOS keymap? I'm not at all knowledgeable in this area, so may be missing some very obvious challenges to doing so.
> The consistency of macOS keyboard shortcuts is one of the main reasons I have huge problems switching to Linux or Windows.
When I left Mac 8 years or so it was quite the opposite:
- home and end depended on application, the only one that worked consistently was ctrl - e and ctrl - a but they didn't work with shift so select to end of line was hit and miss
- one of the shortcuts that sometimes worked was cmd - left, unfortunately that was mapped to go-back-one-page in Safari. Kknd of annoying when you try to select a sentence in a form and end up losing all your carefully crafted edits.
- fn button in the place where ctrl is supposed to be, but only on laptop and small keyboards, not on the full size one. Not remappable (I understand this is fixed now).
I struggled with that machine for three years. After that I realized that Macs are perfect - for Mac people, not for Linux peasants like me.
Just moved to a mac and I'm having the same experience you had. Never had issues with Windows or various Linux distros. Currently I have a pretty absurd Karabiner config to work around some of the issues but I still haven't ironed them all out.
Home/End always worked for me on Windows and didn't work for me on mac until I did a ton of tweaking.
FWIW, I've found cmd+left to be very consistent, the only app(s) that I can think of that it doesn't work in are terminal apps, where I use ctrl+a etc.
And thankfully, the Safari bug/inconsistency has been fixed. In all the major browsers on macos now, CMD+left will behave like "beginning of line" when you're in a text box.
I feel your struggle though, as someone who frequently has to / chooses to use Win/Linux, I don't think I'll ever end the fight against the shortcut patterns that have been ingrained in my hands.
- Ctrl + Shift + left/right arrows: corresponding word selection
- Ctrl + a: select all
- Alt + 1/2/3/...: switch between tabs in Chrome and VSCode where I tested it, don't know if it is working in ALL apps, for example it does not work on alacritty+tmux (where I spend most of my time) for obvious reasons.
I don't know about the consistency, but some of these make more sense semantically, like Alt+1/2/3 - "alternate to a different tab".
I change Cycle Windows to Ctrl+Tab in the Window Manager. I disable menu Alt keys where I can.
I use AutoKey for Terminal so that it works like Terminal in Mac OS X: Copy and paste and other Application shortcuts do not require using a shift key. Alt+C is the kill key (control-c) and all the rest of the Alt keys work like control keys in the terminal.
And yes, despite the non-trivial amount of tweaking and customization, I could never achieve the same level outside of Mac OS X.
> (surprisingly and infuriatingly, this does not apply to native macOS tabs; e.g. in Finder Cmd+1/2/3 changes the view, but not tabs)
That behaviour predates native tabs on the Mac, historically it even predates Safari and other browsers with tabs, I believe.
⌘1,2,3 in Safari for a long time selected favourites in the favourites bar. There is still a setting to still do that. I use it for useful bookmarklets.
The other thing that bugs me when using apps that don't use Mac widgets is single line text fields. If your cursor is at or near the end of the line, pressing the up arrow moves the cursor to the beginning of the line. Same with the down arrow when the cursor is at or near the beginning of the line. Any Mac app that doesn't do that is not using native text fields.
i'm currently switching from windows/linux to Mac and I'm used to using a full-length mechanical keyboard with ins/del/home/end/pgup/pgdn buttons. Yes, mac has these cmd+ shortcuts that work as expected, but the "usual" keys behave wrong/inconsistent in some apps:
Chrome:
- Shift+Home/End selects to the start/end of the entire textarea.
- Home/End first scrolls the textarea, if it is not, if it is already scrolled (this is double weird if you are somewhere down in the textarea, press home, it scrolls you to the top, press home again, it scrolls you back to where you were with the cursor on beginning of the line, then it goes to the start/end of the line as expected.
Safari:
- Home/End only scroll the page, have no effect in textarea,
- Shift+Home/End selects to the start/end of the textarea.
Also, I can't get insert to work in none of my IDEs (pycharm, vscode)
I just have a macbook, so no insert key at all, but vscode has an insert extension that I use when I need insert mode. Probably doing it wrong, but it works very nicely for me when I need it.
I’m loving WSL2 and would like to start mixing my gaming desktop more into my workflow, but I simply cannot feel productive without CMD+left/right.
If anyone knows of a way to rebind Alt+left/right to mimic the behavior, please give me a shout out. I’ve tried to reproduce with remapping to Home/End but I’ve found it really inconsistent.
This doesn't work globally like the other shortcuts, but Ctrl+left/right will move the cursor to word boundaries in camelCasedWords, which is great for programming. I quickly tested it and it worked in Xcode and Sublime Text but not in TextEdit. (You also have to disable the system shortcuts for moving between spaces)
Just to name a few:
- CMD+left/right: start/end of line
- CMD+up/down: start/end of file
- CMD+Shift+arrows: corresponding selection
- Alt+left/right: word movement
- Alt+Shift+arrows: corresponding word selection
- CMD+a: select all
- CMD+1,2,3: switch between tabs in browsers/iterm/IDEs/editors
(surprisingly and infuriatingly, this does not apply to native macOS tabs; e.g. in Finder Cmd+1/2/3 changes the view, but not tabs)
All that + the fact that clipboard, undo/redo, app and windows switching are ALL done via CMD makes it truly a modern hyper button. And you still have Control for Emacs bindings, which also work in most Cocoa text fields.
If you're interested, this [1] is one of the best attempts to bring macOS keybindings to Linux (in particular, Elementary OS). It's a set of settings for Autokey [2].
There is also Kinto [3], which solves one particular problem: copy-paste from terminal with consistent shortcuts.
1. https://github.com/roymckenzie/macos-autokey-phrases
2. https://github.com/autokey/autokey
3. https://github.com/rbreaves/kinto
UPD: edit formatting