Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

51–60 of 153 posts

Re: Keyboard tricks from a macOS app dev

#51

I was hoping this was about lesser known macOS keyboard shortcuts. Alas. Apple has a pretty exhaustive list of so-called document shortcuts that I find particularly useful: https://support.apple.com/en-us/HT201236#text Ctrl+A and Ctrl+E in particular to jump to the beginning and end of a line are a pair that I use dozens of times per day. Same with Opt+Delete to delete the previous word. I use Opt+Left Arrow and Opt+…

Lots of those shortcuts are basically Emacs shortcuts. I’m always sad using gdocs on Linux that they don’t support the Emacs shortcuts.

Re: Keyboard tricks from a macOS app dev

#52

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

I don’t really tile windows much. The main case where I do is with a bunch of terminal windows. Most of what I get out of a tiling window manager is full screen by default and easy keys to switch workspaces.

On macOS the thing that drives me insane is that the many-finger swipe to switch desktops won’t focus the target window until the animation is totally done (like 0.7s after starting). I wish it works like cmd+tab which changes focus instantly. Apart from that I guess I’m not that bothered because I mostly just full screen things. Emacs and iterm2 can do their own tiling of windows.

Re: Keyboard tricks from a macOS app dev

#53

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

Divvy for window management (assign your own shortcut).

For almost everything else there's a standardized system-wide shortcut (including the ancient ones like Ctrl+a/e for text).

If there isn't a shortcut, but the app exposes the action in a menu, you can assign a custom shortcut from keyboard settings.

MacOS has traditionally been very friendly to keyboard navigation. Well, until somewhat recently when mobile-only/mobile-first devs started just slapping Catalyst on and calling it a day. Even Apple's own apps suffer from this.

Re: Keyboard tricks from a macOS app dev

#54

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

I’ll just throw Magnet in the ring for a tiling solution.

I have keyboard shortcuts well in muscle memory now for left/right third/half/two-thirds, and all four corners at a quarter of screen, and full screen. I find that meets 90% of my needs.

Left/right two-thirds is my go-to when coding on 14”. VSCode on the left, Safari on the right. Both big enough to work well, but both leave enough of the other visible to be useful.

Nice little app, costs some reasonable amount of money as a one-off purchase.

Re: Keyboard tricks from a macOS app dev

#55
post #28

BTT is great man, it just allows you to configure any shortcut for any app. But the one key I use the most is assigning “`” key as the back button. You keep your hand on that key while surfing web or any app that has a back navigation, it’s just so much better than clicking or remembering each apps back shortcut. If you really need to type ` then you assign fn-` it’s really rarely used

FYI, the keyboard shortcut for back is ⌘+[, and forward is ⌘+]. This is system-wide, and works in apps like Safari, Finder, Chrome, System Settings, etc.

Re: Keyboard tricks from a macOS app dev

#56

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

I suspect the constant emphasis on mouse use, ever since the first Macintosh, has created an attitude of "keyboard doesn't matter"; I've noticed that even early Windows is very usable with only a keyboard (the Alt, underlined letters, and arrow keys method is particularly well-designed), whereas e.g. classic MacOS is basically unusable without a mouse. In later versions they added keyboard access, but it still feels…

> has created an attitude of "keyboard doesn't matter";

I think you would be surprised at just how powerful the keyboard subsystem in osx is and how malleable it is with some programs or even just editing the plist shortcuts. every menu item in any application can be given a per app or universal shortcut in `system preferences | keyboard | shortcuts | app shortcuts`

You can also use a thing like hammerspoon to do whatever you can imagine basically too... i have a few things for window manipulations via hammerspoon.

You can set up very complex keyboard re-mappings/shortcuts using something like karabiner elements.

you can also change the keyboard access to be navigable via tab in keyboard settings too.

and you can access the menu via ctrl-f2 by default. those settings are changeable too via the keyboard preference pane.

i think you'd be surprised at how much apple cares about accessibility so keyboard nav is not just a power user thing.

At the end of the day I think apple put a lot of thought into the UI and i'd feel pretty stymied going back to windows.(though now the power utilities finally let you remap the windows key to something more useful like ctrl.

Re: Keyboard tricks from a macOS app dev

#57
post #4
post #2

apps you can install which allow keyboard tricks, rather than macOS native.

Just finding the app native ones can be useful, I spent several years using macOs before someone told me about apple-spacebar bringing up a spotlight quick search, which is not the main way I launch things that aren't terminal commands.

spotlight also does simple math! so convenient.

Re: Keyboard tricks from a macOS app dev

#58

I was hoping this was about lesser known macOS keyboard shortcuts. Alas. Apple has a pretty exhaustive list of so-called document shortcuts that I find particularly useful: https://support.apple.com/en-us/HT201236#text Ctrl+A and Ctrl+E in particular to jump to the beginning and end of a line are a pair that I use dozens of times per day. Same with Opt+Delete to delete the previous word. I use Opt+Left Arrow and Opt+…

Lots of those shortcuts are basically Emacs shortcuts. I’m always sad using gdocs on Linux that they don’t support the Emacs shortcuts.

Not just Emacs, but anything that uses readline or similar libraries. Most shells for example.

https://en.wikipedia.org/wiki/GNU_Readline

https://github.com/chzyer/readline/blob/master/doc/shortcut....

Re: Keyboard tricks from a macOS app dev

#59

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

Yeah I find some of the shortcuts confusing, like if I want to enter a directory in Finder I push ENTER and that's ... rename? Instead I'm meant to push PLACE OF INTEREST SIGN + O

Re: Keyboard tricks from a macOS app dev

#60
post #42

I recently purchased a MacBook, and while I'm thoroughly impressed with the hardware, I find the keyboard navigation in the desktop environment somewhat lacking in comparison to my previous experience. Having used Linux Pop OS for many years, I've grown accustomed to the intuitive and powerful tiling window manager and keyboard navigation shortcuts it offers. I'm struggling to find a comparable solution on the macOS…

As a more general suggestion, macOS likely isn’t good at imitating what you previously had, try to understand the workflow they’re proposing, adapt and learn it, it generally gets second nature and pretty decent soon enough, getting to work the way you envision is not apple’s strong suit.

Do you know some good ressources to learn how to use macOS the productive way, using mostly keyboard shortcuts instead of the trackpad?
Post reply on HN