Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

91–100 of 153 posts

Re: Keyboard tricks from a macOS app dev

#91
post #48

Earlier quoted context omitted.

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…

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?

Re: Keyboard tricks from a macOS app dev

#92
post #89

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

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).

Re: Keyboard tricks from a macOS app dev

#93
post #90
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.

The better general suggestion is to find good tools to make your OS life more comfortable rather than admitting defeat right away and imitating the bad old stuck ways of the OS (it's not Apple's strong suit, but there is an app for tha™)

Sometimes that works. Sometimes you're just stuck.

For example, AFAIK, there's no way to eliminate the animation that's triggered when switching spaces/virtual desktops.

Re: Keyboard tricks from a macOS app dev

#94

Earlier quoted context omitted.

Side note that these Emacs shortcuts also work on iOS pretty much everywhere (you even get it for free in completely custom text renderers, so long as you adopt the UITextInput protocol)

How are you using the modifier keys in iOS?

Just connect a Bluetooth keyboard.

Sometimes I use an iPad plus Bluetooth keyboard for writing.

What's annoying is that keyboard shortcuts mostly work in apps, but are sometimes buggy, because I think they're so rarely tested.

Re: Keyboard tricks from a macOS app dev

#95
Tangential topic: my wife has been using MacOS for several years now, and she's a non-IT, average "office" user. She kind of struggles with some of the ways in which you can be really productive with MacOS, and I tried to find a course or something to help her out, but the results are not great.

Is there any online resource that you would recommend to help her refine her skills?

Re: Keyboard tricks from a macOS app dev

#96

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 use NixOS+GNOME+pop-shell for tiling windows on Linux, and I love it!

I am quite frequently on MacOS, and I use Yabai[0] and skhd[1], managed with Nix-Darwin[2] for tiling windows and custom keyboard shortcuts. With how I make my Linux and MacOS builds look and feel identical it's pretty easy for me to forget when I'm on one vs the other.

For anyone curious, here's my repository for deploying my configs[3]. It's awesome to have one source of truth for managing NixOS servers and workstations, MacOS workstations, and other Linux workstations with Nix installed.

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

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

[2] http://daiderd.com/nix-darwin/

[3] https://github.com/heywoodlh/nixos-configs

Re: Keyboard tricks from a macOS app dev

#97

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… one of my favorite commands is opt-shift-/ to search available commands in the menu bar of an app.

Re: Keyboard tricks from a macOS app dev

#98

Earlier quoted context omitted.

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

> If there isn't a shortcut, but the app exposes the action in a menu, you can assign a custom shortcut from keyboard settings. The standardized menu system is underrated, IMO. Setting aside preferences for the menubar being global vs. being attached to app windows, the fact that it's system-owned makes features like this possible. Apple was able to implement custom keybinds for menu items in arbitrary apps because t…

Menu bar search is underused for sure. One of my top commands after I learned about it.

Re: Keyboard tricks from a macOS app dev

#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 inconsistencies that come with intermixing ctrl-option-command are just mind blowing. Even Windows got this right by making the Windows key control window manager specific actions.

Re: Keyboard tricks from a macOS app dev

#100
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).

Yeah. Those are the key combos for editing text, especially on a Mac. If an app does not support them, it's going to be some weird cross platform monstrosity and you're better off if you find a competitor.
Post reply on HN