Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

31–40 of 153 posts

Re: Keyboard tricks from a macOS app dev

#31
I built something similar myself with Karabiner Elements: https://www.youtube.com/watch?v=j4b_uQX3Vu0

TL;DR: Capslock is Hyper key when held (Escape when pressed). Then I have hyperkey sublayers to allow for having essentially infinite commands: Capslock + O ("Open") + S ("Slack"), Capslock + S ("System") + U = Volume Up, J = Volume Down, etc.

Re: Keyboard tricks from a macOS app dev

#32
I've been happy using a combination of Karabiner, Hammerspoon, Quicksilver, and Espanso for these types of tasks for many years.

Although the only thing I really need Karabiner for is remapping caps lock to a custom-defined "hyper" key (something odd combination of right and left shift, alt, command, etc) that everything else can use.

Re: Keyboard tricks from a macOS app dev

#33
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

My man must not write JS

Re: Keyboard tricks from a macOS app dev

#34
post #22

Better Touch Tool changed the way that I operate. Sequencing of keys can make you a productive monster:) Practically speaking, I remove the use of short keys that require to break my fingers every day.

Yeah my most recent discovery is using GPT4 to create applescripts which are triggered by a key combination. One that I use all the time is to open a chrome window with a specific profile to certain webpages

Re: Keyboard tricks from a macOS app dev

#35

Earlier quoted context omitted.

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

Does Rectangle has a shortcut to switch the focused window in a split screen?

I’ve kind of solved this. You can snap windows but you need to add a shortcut in systems to do it. It’s not perfect, but it does work and overtime you miss it less and less

Re: Keyboard tricks from a macOS app dev

#36
post #5

The blog post mentions text expansion via Raycast, but macOS has had its own native text expansion for a long time now (I think maybe since 10.5? Would need to check) under System (Preferences|Settings) > Keyboard > Text Replacements, which comes with the added bonus of syncing to your other Macs and iDevices via iCloud. I've been using it for years and at least for my needs it works great. Not mentioned are the text…

Author here, I use the native macOS replacements as well, mostly because they sync with iOS and they save me a lot of typing on iPhone and iPad. But Raycast works differently in that: - it has dynamic replacements (see the video where I use ,td to type today's date for example) - can place cursor somewhere inside the replacement - makes it easy to add new snippets (Cmd-S on copied text) - is a lot faster in general a…

> I use ,td to type today's date

That single feature alone is worth the app to me.

Re: Keyboard tricks from a macOS app dev

#37
post #25
post #21

Earlier quoted context omitted.

You can mimic that in part with yabai ( https://github.com/koekeishiya/yabai ). Disabling SIP gets you instant Space switching and creating without animation just like Pop_OS. But you can get very far to an automated tiling WM and keyboard navigation even without disabling SIP.

Just because this often comes up; I don't want to disable SIP. However I'm very happy with yabai.

I didn't realize it was possible to use it without disabling SIP, excited to give it another shot! AltTab with a few modifications is currently my preferred way to manage windows.

Re: Keyboard tricks from a macOS app dev

#38
Ah this is from the creator of the 'rcmd' tool. I absolutely love it. Press the right command key + the first letter of an app and it switches right to it! (rcmd + for firefox, i for iTerm, s for Slack, ...)

I came from i3 with 8 predefined windows, but the simplicity of rcmd is really amazing.

Re: Keyboard tricks from a macOS app dev

#39

Earlier quoted context omitted.

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

Does Rectangle has a shortcut to switch the focused window in a split screen?

No but Amethyst does

https://github.com/ianyh/Amethyst

Re: Keyboard tricks from a macOS app dev

#40

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 like it was done as a bare-minimum concession and not originally planned.

Post reply on HN