Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

111–120 of 153 posts

Re: Keyboard tricks from a macOS app dev

#111
post #106

Earlier quoted context omitted.

Thank you, I'm really happy to read you find rcmd so useful ^_^ Also came from i3wm and missed it sorely until I finally settled on rcmd + single-space. Using multiple spaces on macOS is nowhere as easy as on i3.

Do you plan to make a post about your flute-making? Most interested.

I actually do plan, yes! There's so little concrete info on this subject on the internet, that I had to do a ton of trial and error to get fipple design right, tuning, choosing the right wood etc.

I want to collect all my notes on this and publish a series of articles in 1-2 months. Glad to see others interested!

Re: Keyboard tricks from a macOS app dev

#112

One of the best things I’ve configured with BTT is to remove the global Quit application (cmd+Q) and global Hide application (cmd+H) keybindings. I use cmd+W all the time to shut tabs and a slight miss click would close the entire app.

cmd-Q can be disabled in System Preferences too. Handy! No more tears.

Re: Keyboard tricks from a macOS app dev

#113
post #90

Earlier quoted context omitted.

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.

this is not an example of a "workflow they’re proposing"

(also, afaik https://github.com/koekeishiya/yabai allows you to eliminate the animation completely)

Re: Keyboard tricks from a macOS app dev

#114
post #76

Earlier quoted context omitted.

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…

I am not sure whether it applies to this case, but you might try turning on ‘Reduce motion’ under the Accessibility settings, which eliminates some animation delays.

Reduce motion changes the animation to fade-in fade-out but updating focus is still delayed

Re: Keyboard tricks from a macOS app dev

#115

Earlier quoted context omitted.

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

I mean, readline shortcuts are also based on Emacs ones.

Re: Keyboard tricks from a macOS app dev

#116

Earlier quoted context omitted.

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…

Just a heads up — you can solve that one annoyance; there are terminal commands that will reduce that animation to instantaneous.

I tried changing various defaults but lots of them seemed to no longer work. Maybe I only tried the options to increase the speed or I didn’t restart enough things or I spelled something wrong. I also tried looking at the binaries for relevant-looking names of defaults to change and didn’t find any (including the options that old internet advice recommended changing)

Re: Keyboard tricks from a macOS app dev

#117

Earlier quoted context omitted.

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

I mean, readline shortcuts are also based on Emacs ones.

Always assumed it was the other way around without any particular evidence.

Re: Keyboard tricks from a macOS app dev

#118

This post and thread are terrific, and the day I learned common Emacs bindings work in most corners of macOS was momentous, but… Whenever advanced keyboard shortcuts are under discussion, I’m reminded of something I read, I think by Bruce Tognazzini, on an early Apple study of keyboard vs. mouse. They had set up the usual usability test—run through these common spreadsheet tasks or whatever—and compared skilled users…

I don't think this proves anything. For example there is a massive difference between people using shortcuts in an everyday application, people used to Vim/Emacs/whatever to a point they can do the basics without thinking about them, and people who actually customized their setup for their workflow.

And to me it looks like they only focused on the first case because of sentences like this:

> It takes two seconds to decide upon which special-function key to press

Yes, I can definitely believe that I wouldn't be faster than a mouse user if I had to select text with a keyboard in notepad or press Ctrl-Alt-whatever to do simple tasks. But good luck beating a proficient Vim user at anything that has to do with cursor movements, search/replace or repetitive steps - watch a competitive coder use Vim and see how often it takes them "two seconds to decide" to do anything.

I think overall people have a decent intuition about what the more efficient way to control an application is. I frequently use the mouse/touchpad too, because in many GUIs it's simply faster and you can feel that even when you start out focused on the keyboard. Often users switch between window management and using graphical applications, and in those cases leaving the hand on the mouse is the more convenient approach.

And lastly - does it even matter? When someone perceives a certain approach to be faster or smoother, then why not let them? In almost all cases the speed difference doesn't matter.

Re: Keyboard tricks from a macOS app dev

#119
One trivial trick that maybe isn’t widely known: holding down option changes some menus to have additional/alternate options, eg delete vs move to trash, at one point you could get more resolution options. I don’t think I’ve seen this anywhere else (on windows if you right click a file and click ‘delete’ while holding shift, you get actual deletion instead of moving to trash, but the text on the menu doesn’t update)

Re: Keyboard tricks from a macOS app dev

#120

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…

> 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 some unfortunate limitations

But yeah, I'd be surprised if it were a powerful system, that's so rare in the keyboard land...

Post reply on HN