Word – Hotkey (or similar) to quickly switch to a monospace font (“teletype”) in either LibreOffice or Microsoft Office

hotkeyslibreofficemicrosoft wordmicrosoft-office

I find myself doing a lot of writing where I would have to change fonts for certain parts of the text. The obvious example is writing code documentation, where you'd have to reference code frequently, and it's much more readable to write code in a font that distinguishes it from non-code.

In markdown, such as on sites like this one, doing this is super fast and I merely have to use backticks.

Is there some way that I can use backticks or a hotkey to type monospace characters in either LibreOffice Writer or Microsoft Office Word? I don't care if it's only available in one of the two.

It doesn't have to be a hotkey, all I require is that I can use it very quickly while I type instead of having to use the mouse.

Best Answer

Apparently yes! In LibreOffice:

  • Click menu Tools -> Customize... -> Keyboard. A dialog like below will show:

Now, to enable switching to "monospace"/"fixed-width" font, via e.g. Alt-1 shortcut:

  • In Shortcut keys, scroll down to e.g. Alt-1 (was empty for me) and click it;
  • In Category, scroll all the way down to Styles, click it to open, then click Character;
  • In Function, choose Source Text;
  • Click the Modify button (don't forget to do this!). Your Alt-1 should now show in the Keys area (bottom-right).

To enable easy switching back to "regular" font, repeat above steps, but use e.g. Alt-0 instead of Alt-1, and Function Default Style instead of Source Text.

(Based on a reddit answer to a similar question.)

Hints

And by the way, some related shortcuts available by default, apparently:

  • Ctrl-1, ..., 5 -- paragraph style: Heading 1, ..., 5
  • Ctrl-Shift-0 / Ctrl-0 -- paragraph style: Default Style / Text Body
  • F12 / Shift-F12 -- Numbering on/off / Bullets on/off
  • Ctrl-Shift-P/B -- character style: suPerscript / suBscript
Related Question