Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

131–140 of 153 posts

Re: Keyboard tricks from a macOS app dev

#131
post #92
post #89

Earlier quoted context omitted.

It's much better to rebind all of those to more ergonomic alternatives that match your other apps using the tools listed (eg, to similar cursor keys you use in a text editor), which is also useful for non Macs you use (where you could do the same rebunds), rather then learning yet another set of bad old combos

The defaults can be changed (DefaultKeyBindings.dict). However, those keybindings are not just “yet another set of bad old combos”; the same keybindings are used by default in Emacs on any platform, and by most POSIX shells and interpreters (Bash, Zsh, Fish, IPython, etc.). On Mac, they’re inherited by most other GUI text editors (e.g. Sublime).

Thats because they come from GNU Readline

Re: Keyboard tricks from a macOS app dev

#132

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…

If you're okay with a non-open source app (App store purchase) -- "Magnet" is the way to go.

Otherwise go with whats been suggested by others

Re: Keyboard tricks from a macOS app dev

#133
post #92

Earlier quoted context omitted.

The defaults can be changed (DefaultKeyBindings.dict). However, those keybindings are not just “yet another set of bad old combos”; the same keybindings are used by default in Emacs on any platform, and by most POSIX shells and interpreters (Bash, Zsh, Fish, IPython, etc.). On Mac, they’re inherited by most other GUI text editors (e.g. Sublime).

Thats because they come from GNU Readline

I agree, Readline is the reason they got so widespread. But note that except Bash, none of the shells and interpreters I listed actually use GNU Readline these days — and that Emacs and its keybindings predates Readline.

Re: Keyboard tricks from a macOS app dev

#134

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+…

I love these built in shortcuts. I’ve added Karabiner to remap caps lock to esc and ctrl (not for Vim) and also right cmd-hjkl for instant arrow key access. Spotlight usually works for most of my needs as well. It’s frustrating when an app overwrites built in shortcuts like in Intellij on Mac, searching for shortcuts in the menu bar search doesn’t allow opt-delete if I remember correctly. Speaking of menu bar search……

IntelliJ text expansion hotkeys (option + up/down) or spell checker (option enter) should be part of every operating system.

Re: Keyboard tricks from a macOS app dev

#135
post #48

Earlier quoted context omitted.

I had the opposite experience with MacOS. I hold every OS I've used since the early aughts up against MacOS 9 and they are all lacking in terms of keyboard navigation. Maybe it was because I had the previous 10 years to practice, but I felt I could do almost anything in pre-OSX MacOS with the keyboard, only relying on the mouse for application-specific stuff like photo editing. Navigating, filtering, opening files an…

but I felt I could do almost anything in pre-OSX MacOS with the keyboard How do you open the menus and browse through them to find and select the option you want?

IIRC for the most part option-f would bring me to the file menu. I could down-arrow to scroll through it or hit the right arrow to move to the next menu. In that way I could navigate pretty well.

Re: Keyboard tricks from a macOS app dev

#136

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+…

sizeup is excellent. add swish and it's even better.

Re: Keyboard tricks from a macOS app dev

#137
post #99

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+…

I find it fascinating that your examples are actually the readline/emacs shortcuts, or the workarounds that had to be implemented for the lack of PC keys (Home/End/PgUp/PgDown) The more I got familiar with MacOS, the more I realized all those feature pictures ople praise MacOS for are just workarounds / copies from other systems, and (even power-) users just aren't familiar with other systems hence their amaze. The i…

I always hated the home/end keys. The way Mac does it is way better and I didn’t really start using Macs until two decades after I used windows and Linux. Cmd+left/right is way easier to use, especially on a laptop and custom keyboard.

Re: Keyboard tricks from a macOS app dev

#138
post #42

Earlier quoted context omitted.

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?

You can use hammerspoon to solve almost every issue you have.

Re: Keyboard tricks from a macOS app dev

#139
post #120

Earlier quoted context omitted.

> 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 wha…

Except you can't bind every menu item: some menu names are dynamic, so you can't bind to them, and not all the keys are supported, and there is no left/right modifier differentiation. Also, you have to retype the full command path by hand, which is insane, so you can't do that either (you should be able to just hover over a command and press keybind to rebind) Even with the awesomeness of Karabiner Elements there are…

Can’t you handle a lot of that with Automator? Honestly it’s funny to see so many people saying Mac is terrible at this when I can’t imagine a worse OS for shortcuts than windows and Linux you have to script everything. Mac managed to make it user friendly and scriptable at the same time.

Re: Keyboard tricks from a macOS app dev

#140

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…

It's a sore-spot for sure. I've found that Rectangle[0] does a good enough job. [0] https://rectangleapp.com/

Hammerspoon is by far the best option for devs, it’s more powerful than pretty much every solution out there, including better touch tool, and the only additional software I need is karabiner elements and alttab. Those three pieces of software will solve every single problem you have with Mac.
Post reply on HN