Readit News logoReadit News
jmmv · 3 years ago
The macOS shortcuts seem like an easy thing to dismiss... but once you have bought into them, they are kind of thing that turn into a deal-breaker when trying to move away from macOS.

The dedicated Cmd key for most operations (which doesn't conflict with, say Ctrl+C in the terminal) is super-convenient. The consistency across apps is... something that you can't appreciate until you experience it. And the pervasive Emacs-like text navigation shortcuts throughout the system are productivity boosters. I like how someone else described the "right side of the keyboard" as "keyboard Siberia" -- I have not touched it for years and have not missed any of those special keys in minimalistic keyboards that don't have them.

Until I tried to actually move off of macOS last year. The different shortcuts on Windows were and still are super-painful. For months, I fought those and tried to use macOS-like shortcuts on Windows. You can see my AHK configuration here if you are interested in adopting something similar: https://jmmv.dev/2021/07/macos-ahk.html

Recently, though, and because that setup is problematic at times and because I decided to remove macOS altogether from my machine... I'm trying to retrain my hands and adapt to the non-macOS shortcuts. It's painful and I miss the macOS consistency a lot. On the plus side, however, after a few weeks of this on Windows, I booted into a FreeBSD desktop and could navigate the system pretty well :) Some more details here: https://jmmv.dev/2022/03/a-year-on-windows-shortcuts.html

lloeki · 3 years ago
Being able to map any menu item for any app in the Keyboard pref pane, Shortcuts tab by typing the exact label (case sensitive) is crazy.

You don't even have to have a third party app to snap left||right or maximise via the keyboard, as these are available (behind Option either in the menu or when hovering over the traffic lights, but once you bind them they're always there, example is my bindings):

    Ctrl+Option+Return: Zoom
    Ctrl+Option+Left:   Move Window to Left of Screen
    Ctrl+Option+Right:  Move Window to Right of Screen
And for multihead users there's "Move to <display name>".

Again in Keyboard pref pane, Shortcuts tab, under Mission Control there's also Switch to Desktop 1-N keyboard shortcuts but you first have to create as many virtual desktops (a.k.a Spaces) as you want to have all the shortcuts show up. Make sure to disable "Automatically rearrange Spaces based on most recent use" under Mission Control pref pane to keep them predictable. Since the total count is spread across display heads, I create 5 on my left screen and 5 on my right one. I also disable "When switching to an application, switch to a Space with windows open for that application", otherwise clicking on a Dock icon jumps me to another Space when I just want to have the app activated. As a i3 user on Linux (which of course is in another league) this brings macOS kind of close enough in behaviour to not be too jarring for me when I jump from one to the other.

Another one of my favourites is Paste and Match Style, which is absolute genius.

clashmoore · 3 years ago
Okay, I liked your idea of the window moving left and right and I tried to parse what you said and how to set it up as I haven't done shortcuts like this before.

In every app's menu bar (so like Safari or Chrome), there is the Window menu item. If you open that then press and hold the Option key on the keyboard, you'll see some alternative commands - two of them being:

    Move Window to Left Side of Screen
    Move Window to Right Side of Screen
You'll need those exact command names when you open Apple -> System Preferences -> Keyboard -> Shortcuts tab. Then under App Shortcuts you can add some new shortcuts, where you can assign the Ctrl+Option+Left to the command title "Move Window to Left Side of Screen"

Once added, as you've said - once they are bound they will appear in the Window menu now as well.

jen729w · 3 years ago
Appreciate the option to do it without 3rd party tools, but if you do want more power in this space I find Magnet indispensable.

I have shortcuts for left/right-third and two-thirds, as well as left/right half, which I must use dozens of times a day. Oh and I use ASZX to push stuff to the 4 corners too.

A lovely little utility app.

https://magnet.crowdcafe.com/

zwaps · 3 years ago
Conversely, switching from Windows/Linux to MacOS is also very painful.

For instance, why is there no way to minimize to desktop? Having to use Command+Button to go to beginning/end of a line? A horror for coding.

My favorite pain point: @ in some regional keyboard layouts for Win/Linux is ALTGR+Q, whereas the keys with the same physical action in MacOS close the program. Fun when writing emails, or using passwords and logins.

Also, whether its due to capability or lack thereof, MacOS has the most custom UIX apps/addons/plugins of any OS. Heck, our corporate Macs come with some of those preinstalled.

jmmv · 3 years ago
Yes, of course migrating to macOS is equally painful.

But after doing that transition myself many years ago and then back to Windows now... I think that the macOS shortcuts are objectively better. The consistency across the whole system is hard to describe unless you have experienced it, and the distinction between Ctrl and Cmd is quite ergonomic.

I'm kind of sad that, in 1995, when Microsoft introduced the Win and Menu keys... these did not become _the_ keys to drive shortcuts. I think it's only until recently that extra shortcuts have been added to the Win key.

gumby · 3 years ago
> Having to use Command+Button to go to beginning/end of a line? A horror for coding.

Cmd-arrow keys work fine for this, if you are willing to take your hands off the home row, which I am generally loathe to do.

The Mac inherited emacs keystrokes from the NeXT days, so control a (beginning of line) and control e (end of line) “just work” in any text widget. Likewise open a line, kill a line, previous or next line.. .with 40+ years of those wired into my fingertips I didn’t even notice that I was using them!

r2b2 · 3 years ago
On Mac, ⌘ + M minimizes a window (like on Windows) and ⌘ + H hides all of an app's windows.

You can then use ⌘ + Tab [+ Arrows] to get back to both minimized windows and hidden apps. Combined, this window-access flow is simple yet powerful.

paperpunk · 3 years ago
> For instance, why is there no way to minimize to desktop?

There is I think. Something like Cmd+F3? I use this a lot.

dotancohen · 3 years ago
My old personal Debian derivative, Door Linux (because Windows are for bugs), used the Win key for all non-application shortcuts, save Alt-Tab because that is just too familiar though Win-Tab would also work. Some examples are Win-1 for English, Win-2 for your second language, etc. Win-[ for Volume Down and Win-] for volume up. Win-L for lock screen, Win-F2 and Win-F12 both would open Krunner.

I started configuring these shortcuts due to the powerful and plentiful shortcuts in Jetbrains IDE, which always seemed to be masked by some KDE default shortcut or another.

laacz · 3 years ago
It actually works the other way around too - moving from Windows to Mac is a pain because of the shortcuts. It was a challenge to overcome in many aspects, but one of the most annoying things is that there is no keyboard shortcuts for navigating application menus. That still bugs me very often.

Edit: spelling.

brailsafe · 3 years ago
I tried to use Windows for some shitty corporate gig a few years ago, and after getting used to using things like ctrl+e ctrl+a etc for line ends and beginnings, I was also so frustrated. Hated that fucking piece of shit laptop.
jmmv · 3 years ago
Right? I _despised_ one of the laptops I got from work because it did not allow me to install AHK to leverage my macOS-like shortcuts, so I was extremely unproductive while using it. Kinda fixed now that I've been retraining myself to the PC-style shortcuts.
knighthack · 3 years ago
Why did you decide to move off MacOS?
12ian34 · 3 years ago
I used Mac and Windows alternately since 1997 until 2017 when I moved to Arch Linux with the i3wm Tiling Window Manager [0].

i3wm is easily one of the key things keeping me using Linux as my daily driver (personal + work). It's so simple yet deeply configurable. Sure, it takes a bit of time to tweak and get used to but IMO it has paid off massively. It has made using a computer just so much more of a joy. Whenever I use Mac and Windows I really miss i3wm. I spend barely any time moving Windows around - everything Just Works (with the caveat of some tweaking - but my config file is only about 100 lines of i3 declarations) and I've barely had to change it in 5 years.

I do go around shilling i3wm here and there on hn, purely just because it has provided me actual joy and I want others to know about it! I know the Apple crowd are fans of everything Just Working, and i3 comes with sensible defaults to enable that.

[0]: https://i3wm.org/

mmphosis · 3 years ago
I used Mac since the 1980s, and been able to tile windows, stack windows, and overlap windows. The Mac would remember size and placement. IIRC, the Mac II could support windows spanning across up to nine monitors of various resolutions, shapes, and bit-depths. MPW had window splitting which was annoying. The Finder has/had Zoom which would resize the window to the smallest size with no scroll bars. I've wished there was an easy way to implement Zoom in other applications.

With small screen phones, the screen is usually filled with only one app/mode at a time. I see a lot of the same use on Windows where there is only one maximized app/mode at a time, even though one can tile, stack and overlap multiple windows. Window's Multiple Document Interface (MDI) has somewhat morphed into "Tabs" which still present only one tab/mode at a time. No modes please. I am looking at the screenshots and videos for i3 and see a lot of scrollbars and wasted screen space. I don't see the advantage of i3 over Mac or Windows, or XFCE that I use in Linux. What am I missing? Maybe I'm good with what I've got.

12ian34 · 3 years ago
Sure, the tiling concept isn't new.

It's easy to come across lots of overly done up i3 setups, often using "i3-gaps" which is a modified (fork, I think) of i3 which introduces gaps between all windows and the screen edge in the name of prettiness. This is common in the /r/UnixPorn community and frankly, I would never use it. Perhaps you're seeing a small subset of potential i3 setups. On scrollbars, I don't feel like I see any more scrollbars than in Mac or Windows. Probably less?

The main benefit I see in i3wm compared to any other window managers in other OSes is actually the use of space, my windows are literally edge to edge. Apps don't have title bars unless you've got your windows stacked, and you can customise exactly how many pixels the title bars are. You can customise the colours of active, hovered and inactive window titles. You can add borders to windows, of any size and colour, you can have none.

I also love the multi desktop feature which I use prolifically. I have 10 desktops named 1-10 but you can call them anything you want (emojis work too, thanks unicode). Certain apps always open in certain windows so I always know where everything is. This is all declared in a config file so it's never a guessing game - it just works. Also, I have 2 monitors and multi-monitor support for window management works a dream.

It's not just the tiling - moving windows around is so easy, I can press $mod+Shift+5 to move a window to desktop 5, or $mod+Shift+Left to move it to the left, or even $mod+Shift+Alt+Left to move it to the left monitor. These are second nature to me now.

Finally... the speed. Wow, switching between desktops, windows, monitors just happens incredibly fast. When I use a Mac or Windows I just can't stand all the animation and slowness. M1 macs included. This is in part helped by the picom compositor, with animation time reduced to being nearly negligible whilst being enough to "look nice".

beepbooptheory · 3 years ago
It is extremely hard to go back to anything else after i3wm, even when I do wish I could have some more things taken care of for me in a full fledged DE -- mostly stuff like touchpad configuration, polkit, theming. Longing for a central settings manager like KDE/Gnome, but still not worth it to give up the i3 world.

And yes, I know you can use KDE or Gnome as a DE to i3's WM, but the things you have to do to get it to work are very brittle and it feels very hacky, makes it not worth it.

Haven't had enough money for a Mac in the past decade, but this article makes a good case that I could at least tolerate it coming from i3!

curioussavage · 3 years ago
You should check out the regolith project then.

It’s pretty awesome, I just wish someone would start an equivalent project for sway.

12ian34 · 3 years ago
I think I'll be getting a Macbook for work soon so did investigate TWMs for mac and Amethyst[0] comes up a fair amount. It will for sure be the first thing I try.

[0]: https://github.com/ianyh/Amethyst

adhesive_wombat · 3 years ago
I love i3, though I get a bit jealous when I see a shiny DE like GNOME, since I haven't added any beauty to it, other than making the highlighted window more obvious.

I'm definitely not good at using it effectively: I usual end up with a stack of about 10 windows in one frame, but turning them to a tab frame would prevent me moving sideways to other frames (I often have them side by side).

Probably I could make a command to do it, or use marks properly.

Also not being able to maximise a window but keep the i3bar showing is super annoying.

TacticalCoder · 3 years ago
I'm using another tiling WM, "The Awesome WM", since forever. I'd really like to see a comparison of i3wm vs Awesome. My setup is working so great for me that I cannot see myself switching to i3wm, unless it's really that much better than Awesome.

But I'm curious: you're not the only one to shill i3wm: obviously people using it love it.

Dead Comment

Dead Comment

flurie · 3 years ago
I like that the author points out a number of great default shortcuts in macOS, but I find it hard to beat the combination of yabai[1] and skhd[2] for the best keyboard-driven workflow. In the absence of these, I would be more inclined to try either Hammerspoon or Karabiner-Elements. I also find Phoenix[3] intriguing, but it's probably too much work to get it to where I'd want it for daily use.

[1] https://github.com/koekeishiya/yabai

[2] https://github.com/koekeishiya/skhd

[3] https://github.com/kasper/phoenix

jonfw · 3 years ago
If this seems like too much configuration overhead for anybody else, check out amethyst[0]. It's UI driven and configured similarly to xmonad- which is more opinionated than some other tiling WMs

I liked i3 when I was a linux user, but since I've switched to Mac I've tried to use tools with UIs and opinionated configuration

[0] https://github.com/ianyh/Amethyst

flurie · 3 years ago
I did not mention Amethyst despite liking what it does because it is what I'd call "begrudgingly configurable." It will let you configure it, but it would rather you didn't.

The trade-off is that yabai is instead annoyingly configurable, and its set of sane defaults is just okay. The only way I've found to mitigate this is by browsing yabairc/skhdrc files on github. I steal whatever looks good, and I keep it if it works well for me.

gundamdoubleO · 3 years ago
I found yabai to be a little buggy when I moved over to an M1 Mac from an Intel one. Haven't tried it for a few months now so maybe it's time to hop back in. It's an amazing piece of software if you're used to some of the TWMs available on Linux, it made the transition into MacOS much more manageable.
flurie · 3 years ago
There was a recent major release that added in M1 (and Monterey) support. A few of us have been using it since the beta a few months back. It works at least as well as it did previously, and it feels much snappier now.
galoisscobi · 3 years ago
Curious to hear if you use Yabai with system integrity protection enabled and if so, what features do you lose?
kaveet · 3 years ago
Yabai's wiki has a list of the features you'd lose:

https://github.com/koekeishiya/yabai/wiki/Disabling-System-I...

I use it with SIP enabled and haven't had any pain points.

flurie · 3 years ago
I now run it with SIP enabled on my work machine, not by choice, and I didn't find it made a huge difference. I think the only major thing I lost is easy app movement across spaces, but that is mitigated somewhat by having pre-defined spaces for things I use a lot, such as browser, editor, mail, calendar.
sxg · 3 years ago
Creating a Hyper Key (i.e., remapping capslock to become an additional modifier key) is a game changer! I use Capslock [1] with Karabiner Elements on macOS.

[1] https://github.com/Vonng/Capslock

reaperducer · 3 years ago
If you're not into installing third-party tools, you can create your own hyper key by using a combination of the Shift, Control, Option, and Command keys† (Shift, Control, Meta, Super).

Because macOS uses Control+Option to activate the on-screen magnifying glass, I use Shift+Option+Command, which works well for my hand size.

I haven't found any macOS or third-party programs that use Shift+Option+Command for shortcuts yet, so there haven't been any conflicts.

Once you get your personal shortcuts set up in Apple → System Preferences → Keyboard → Shortcuts, it's really a major productivity boost.

†I think you can use Function now, too, since Preview uses it, but haven't tried it yet.

rrdharan · 3 years ago
I use Karabiner Elements to make CapsLock either Escape (when tapped) or Control (when held / pressed with another key) - works great with a Kinesis Advantage:

https://pastebin.com/6gQFV9EY

chris37879 · 3 years ago
I get this horrible bug with Karabiner where it just slams one of my CPU cores... I was actually planning to replace it because of that.

My current issue is that I can't have my macbook's keyboard use the system control keys while my external uses F keys. Like if I don't have the 'use f keys' option on in prefs, my external F1 and F2 become brightness keys...

dylan604 · 3 years ago
That makes some logical sense to me though. If your keyboard layout is set up for a Apple keyboard where the function keys are actually OS specific keys, then it shouldn't matter if your keyboard has a F[1-9]+ printed on them or Apple symbols. The key will just do what it's mapped to do.

It's like expecting a DVORAK keyboard to work when the computer is still in QWERTY mode. There's just more matching overlap between keyboards with function keys vs Apple symbols.

saagarjha · 3 years ago
Note that if you just need to remap a key, the built-in hidutil command is more than sufficient.
recuter · 3 years ago
I don't remember which Mac OS added this, but:

System preferences => Keyboard prefs => Modifier keys

You can just remap caps lock to escape without getting fancy. I used to do the hyperkey stuff but it messes with my muscle memory when I'm not using my computer.

There's something to be said for keeping things as simple and close to default as possible.

SkyPuncher · 3 years ago
I use Karabiner to move my symbols to my home row and arrow keys just above. When I'm programming, that means I rarely need to move my fingers off the home row.

* caps + a = !

* caps + s = @

* caps + d = #

* etc

-----

Single tap caps is also an escape key.

evanb · 3 years ago
I set capslock to an iTerm terminal window.
frankus · 3 years ago
I end up using the built-in emacs key bindings a lot (they also work in many shells).

Ctrl-k (cut to the end of the current line and save it in a special secret extra clipboard) and ctrl-y to paste

Ctrl-e to go to the end of a line, ctrl-a to go to the beginning.

Ctrl-d to forward-delete, ctrl-t to transpose characters (this rarely saves time but I do it anyway).

You can also use ctrl with b, f, p, and n to go back or forwards one character or to the previous or next line, but I just use the arrow keys.

jwr · 3 years ago
Yes, this is a fantastic feature of MacOS, and one that many people do not appreciate enough. It's so incredibly convenient to be able to use the same keys in every entry field.

Unfortunately, more and more apps try to do something "smart" when you click in a text field, like auto-selecting the entire text (WHY WOULD YOU EVER DO THAT?).

And some apps just don't respect the platform conventions and as a result feel incredibly clunky and annoying to use (Autodesk Fusion 360).

criddell · 3 years ago
Fusion 360 is incredibly clunky and annoying on Windows as well.
amake · 3 years ago
You can get even more Emacs bindings by providing an appropriate ~/Library/KeyBindings/DefaultKeyBinding.dict; example:

https://github.com/amake/dotfiles/blob/master/prefs/Library/...

__mharrison__ · 3 years ago
If you are on Windows, look into AutoHotkeys. There are various emacs scripts for this floating about. I've found that it gives me a better experience than I had on Mac.
antipaul · 3 years ago
ctrl-n and ctrl-p also work to select things – so much closer than getting to the arrow keys ;)

Examples: search results in safari, search results in GitHub.com search.

Sadly, google chrome and apps like docs don't respect this

ubercow13 · 3 years ago
They don't work everywhere though, making them basically useless. For example ctrl+a and ctrl+e don't work in the Safari address bar or the text box I'm typing this comment in, or TextEdit, and many other native text widgets.
reayn · 3 years ago
First and foremost, they should work everywhere, especially the places you describe, almost every native widget (even in third party native apps) should support the readline bindings.

If, however, you desire more control, you can use Karabiner-Elements [0] and one of the many [1] community made emacs-like configurations to have this behaviour system wide, these also add many many more keybinds (such as C-w to delete last word) to further emacsify your workflow!

1. karabiner-elements.pqrs.org

2. https://ke-complex-modifications.pqrs.org/?q=emacs

giraffe_lady · 3 years ago
I use these bindings constantly every minute of every day. I know exactly which apps break it because it annoys the shit out of me, and those aren't the ones.

You must have broken a configuration or have some other problem. I'm writing this in safari and can use these bindings in this text box and the address bar right now.

saagarjha · 3 years ago
They work for me? Do you have an app that might be eating those shortcuts?
chrisfinazzo · 3 years ago
For the places it doesn't work well, you can usually guess the reason. TextEdit and Safari respond to Command as the primary modifier, the same as any other Cocoa application.

(FWIW, I just tried this in TextEdit's plaintext mode on Big Sur and it does indeed work - more than likely due to the UNIX heritage, the emacs bindings work here too)

It is well known that Command-L will focus the address bar and select any text that might be there, so overriding it is generally a bad idea if you can avoid it.

The same goes for 3rd parties - my Dad is a recent convert to macOS and is frequently stumped when Control-A doesn't select text in Microsoft Word - I explained this to him, but in the moment he sometimes forgets.

sodapopcan · 3 years ago
They work for me literally everywhere. I also add ctrl-w and ctrl-u.
evaneykelen · 3 years ago
My favorite shortcut is to restore minimized windows by pressing Command-Tab to display the application switcher, selecting the minimized app's icon, holding down Option (⌥), and then letting go of the Command key. The minimized window will be restored to its previous position and dimensions.
chrisfinazzo · 3 years ago
When the "Minimize into the Application icon" feature appeared back in Snow Leopard, I was very much into this kind of thing. Yet over the years since, I've moved to mostly using Cmd-H to hide.

I tried the method you described and it seems to only bring back the frontmost window DragThing/Front and Center style.[1]

Odd.

[1]: https://hypercritical.co/front-and-center/

Cockbrand · 3 years ago
Cmd-H seems very underused to me, even by Mac power users. The reason might be that many recent Mac users are converts from Windows or Linux, where the concept of hiding an app doesn't exist. I love and extensively use this feature since I started using Macs about 25+ years ago. It's so much more convenient than minimizing an app's window(s) into the dock, and it's so nicely complemented by the app switcher.
jibbers · 3 years ago
You can also hide by holding option while clicking outside the window.
sisk · 3 years ago
In case you have multiple minimized windows, another seemingly little known trick is pressing 1 while in the application switcher which will show all of the windows for the highlighted application.
chillage · 3 years ago
It is far easier imo to just use a dedicated window switcher which shows all open windows right away https://alt-tab-macos.netlify.app/

Deleted Comment

hirvi74 · 3 years ago
Ctrl + Up arrow has a similar functionality where the user can use the arrow keys to select one of the multiple windows.

Dead Comment

mFixman · 3 years ago
As someone who grew up with Windows XP, the first thing I do when I get a new Macbook is install Hyperswitch [1] which makes Cmd+Tab cycle through all windows of all applications of the current desktop.

The regular OSX workflow seems to be only good for a workflow that includes a single maximised Chrome window with a million tabs open.

[1] https://bahoom.com/hyperswitch

kitsunesoba · 3 years ago
It’s been quite the opposite for me. I find that the “windows” model of alt-tab quickly breaks down — the number of windows the switcher can comfortably handle is reached and exceeded quite quickly, which then drives me to try to do everything in a couple of maximized windows. The logical separation of applications and windows sidesteps this problem nicely.
ascagnel_ · 3 years ago
I also grew up on WinXP, but I prefer how macOS separates application & window switching. I'd like to see per-tab support added in the mix somehow, but that could be tricky. Safari supports a gesture (pinch inwards) and a keyboard shortcut (Command-Shift-\) to get a zoomed-out view of all tabs in a window, but a window with a bunch of tabs is hard to scan like that.
WeZzyNL · 3 years ago
I’m always surprised Contexts [1] isn’t mentioned more in this, eh, context.

It’s absolutely wonderful as a window switcher for macOS, second to none in my view.

[1] https://contexts.co/

kergonath · 3 years ago
MacOS is application-oriented, and it is great. I can't stand the precise behaviour you like when I am forced to use a Windows computer at work.

My windows currently open: ~50 iTerm2 (with loads of tabs and tmux sessions), 5 TextMate (quite a lot of tabs as well), 6 Safari (ditto), 1 Messages, 1 Mail, 1 Music. Cycling through the 50-odd windows to swap to mail would be insane.

The use case you mention is precisely where application orientation is useless, I am not sure why you bring that up.

mFixman · 3 years ago
I don't see it that way. As far as I'm aware there's no way to switch to one of your iTerm screens using the keyboard without raising all 50 up to the foreground.

In most cases I have several windows open but I want to cycle between 2 or 3. I find Windows-like window switching much better, but I guess your mileage may vary.

benhurmarcel · 3 years ago
It's just a matter of preference. I prefer to think in terms of document rather than application. I don't care whether my previous document is opened in Word, VSCode, Text Edit, Notes or whatever, but I want to go back to it.
chris37879 · 3 years ago
I completely agree on keyboard nav, but when I'm using my laptop, even at my desk, I position it so I can reach and do gestures on the trackpad, sometimes it's just easier for me, and I find myself missing them on my desktop machine that doesn't have a trackpad.
beyti · 3 years ago
What I would definitely suggest on top of this list is: https://www.hammerspoon.org/ for extensive keyboard + functionality customization.
Kungfuturtle · 3 years ago
I would also suggest https://github.com/koekeishiya/skhd for hotkeys; it also pairs well with an associated project for window tiling and management: https://github.com/koekeishiya/yabai