Live data from Hacker News

Keyboard tricks from a macOS app dev

notes.alinpanaitiu.com

1–10 of 153 posts

Re: Keyboard tricks from a macOS app dev

#3
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 navigation shortcuts that have been built into macOS for a similarly long period of time. They work in any text field in nearly every app (with exception to a few oddball apps that are usually built with "game engine style" UI frameworks), and come in both control-based emacs style and Apple style flavors[0]. I use these constantly and they work exceptionally well for smaller keyboards (e.g. 60% or HHKB).

[0]: https://jblevins.org/log/kbd

Re: Keyboard tricks from a macOS app dev

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

Re: Keyboard tricks from a macOS app dev

#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 and can work inside words as well

Re: Keyboard tricks from a macOS app dev

#6
I used to have a clipboard manager that gave me access to my last X copied items, as well as a navigable list of snippets. A few years back, a MacOS update broke whatever tool I was using, and I ended up buying BetterTouchTool. BTT does give me my clipboard history, and it appears to be very powerful in general, but I can't figure out an easy way to replicate the navigable list of snippets.

I do use the MacOS text expansion system for my name and a few other items, but what it lacks is (1) I cannot use hyperlinked text in the expanded snippet, and (2) it requires me to remember an incantation for each expansion (I want to be able to look at a list of items and pick the one I want.

Does anyone know of a tool that can do this? I don't mind paying, but free is always appreciated!

Re: Keyboard tricks from a macOS app dev

#7

I used to have a clipboard manager that gave me access to my last X copied items, as well as a navigable list of snippets. A few years back, a MacOS update broke whatever tool I was using, and I ended up buying BetterTouchTool. BTT does give me my clipboard history, and it appears to be very powerful in general, but I can't figure out an easy way to replicate the navigable list of snippets. I do use the MacOS text ex…

FastScripts[1] might be worth a look. I've been meaning to check it out myself though so I can't offer any personal experience with it.

[1] https://redsweater.com/fastscripts/

Re: Keyboard tricks from a macOS app dev

#8

I used to have a clipboard manager that gave me access to my last X copied items, as well as a navigable list of snippets. A few years back, a MacOS update broke whatever tool I was using, and I ended up buying BetterTouchTool. BTT does give me my clipboard history, and it appears to be very powerful in general, but I can't figure out an easy way to replicate the navigable list of snippets. I do use the MacOS text ex…

Raycast's snippets mentioned in the article can do exactly that, screenshot here: https://shots.panaitiu.com/GmT5v4Zj

It can do the incantation thingie, but it also allows binding a hotkey to showing a list of your snippets, searching through them, and inserting them with Enter.

It can also do hyperlinks, bold, italic, if the app you're typing into supports rich text. Example: https://shots.panaitiu.com/gw50Zdcm

Re: Keyboard tricks from a macOS app dev

#9
post #8

I used to have a clipboard manager that gave me access to my last X copied items, as well as a navigable list of snippets. A few years back, a MacOS update broke whatever tool I was using, and I ended up buying BetterTouchTool. BTT does give me my clipboard history, and it appears to be very powerful in general, but I can't figure out an easy way to replicate the navigable list of snippets. I do use the MacOS text ex…

Raycast's snippets mentioned in the article can do exactly that, screenshot here: https://shots.panaitiu.com/GmT5v4Zj It can do the incantation thingie, but it also allows binding a hotkey to showing a list of your snippets, searching through them, and inserting them with Enter. It can also do hyperlinks, bold, italic, if the app you're typing into supports rich text. Example: https://shots.panaitiu.com/gw50Zdcm

Thanks, I was just checking it out based on the article mention. Looks like it's free for personal use, too!

EDIT: Looks like for snippets, it requires a key command to get Raycast to appear, then you have to say Search Snippets, then you have to type your search string, then you have to select the desired snippet. Is it really this many steps? My old workflow was shift-cmd-v, choose the desired snippet via arrow keys, hit return. With muscle memory, this ended up taking less than 4 seconds for most snippets.

Re: Keyboard tricks from a macOS app dev

#10

I used to have a clipboard manager that gave me access to my last X copied items, as well as a navigable list of snippets. A few years back, a MacOS update broke whatever tool I was using, and I ended up buying BetterTouchTool. BTT does give me my clipboard history, and it appears to be very powerful in general, but I can't figure out an easy way to replicate the navigable list of snippets. I do use the MacOS text ex…

This is the way: https://maccy.app
Post reply on HN