I write a lot of technical emails, and like to use a monospaced font for the code bits. Highlight text, hit apple-T, choose my font from the list of favorites, then close the font window. Is there a way to use a keyboard shortcut to apply a given font to the currently selected text? Ideally this would be OS-wide, but if that's not possible I can use it for just a single app (Mail.app)
MacOS – Assign monospaced font family to selected text with keyboard shortcut in mac os x
fontkeyboardmacos
Related Question
- Word for Mac: how to increase/decrease font size with (laptop) keyboard
- MacOS – how to assign keyboard shortcut to buried command
- MacOS – Cannot read keyboard shortcut text
- MacOS – Keyboard shortcut for monospaced formatting in Notes app
- MacOS – Want to add keyboard shortcut to open selected file with specific mac app
- How to mix fonts in a way that doesn’t change line spacing
Best Answer
I've been looking for doing this for a very long time.
I finally managed to end up with something that really works great for me, with the help of Alfred and Highlight CLI tool.
Here is the Alfred script portion :
Make sure the shortcut trigger adds
__SHORTCUT__
to be recognized and argument is "Selection in OSX" :Short demo https://youtu.be/y8NJT52APRQ