Keyboard shortcuts for superscript and subscript

Can anyone explain exactly how to set up keyboard shortcuts for superscript and subscript? I tried to do this via System Prefs…Shortcuts…App Shortcuts but it does not work (I tried assigning them to F16 and F17).

There is a detailed checklist in Appendix A.1 of the user manual that goes over how to do this. It sounds like you have the right idea, but take note that the system is very literal. The menu name needs to be typed in precisely as you see it printed, and sometimes it helps to supply the whole path to the command (as explained in that section).

I’d also try a few different keys. F16 and 17 are beyond what even a full-size Apple keyboard provides, I think (it’s been a while since I’ve used one). Maybe try something at or below F12.

Still no success. I’ve tried Superscript and Format->Font->Baseline->Superscript and assigned them to ctrl-=. The system just barks at me. This is a big issue for scientific writing.

Have you tried using the menu command in the same context you’re trying the shortcut? A beep can also mean the command is disable.

While you’re looking at the menu, do you see your shortcuts assigned? I’ve got no problems here, using a similar setup to what you describe:

An alternative, and with the added flexibility of the use of styles is to create Subscript and Superscript character styles and you can assign them to the built-in styles keyboard shortcuts, or still use a system override[1].

I really dislike the Apple text system sub/superscripts and one advantage of using styled sub/superscript is that compile can convert from the Apple system to (in my case) Pandoc easily; however even then I try to use unicode replacements wherever possible, so for example 1.45×10⁻¹⁷⁸ or CO₂ works wherever unicode does without breaking the text baseline.

[1] and if you really like to customise keyboard shortcuts, you should consider trying BetterTouchTool, works great with Scrivener:

OK, using character styles and cmd-opt shortcuts works. Thanks!

I am now using BetterTouchTool for these shortcuts, and indeed it works great! (Once you figure out how it works–the documentation isn’t very good)

I think the fact this is built into the OS is one of the major highlights of macOS, but BetterTouchTool combines so many other options and features and greater flexibility that it still gets a coveted spot in my menu bar! It was AmberV who suggested to me to start using BTT again (I used to use it for mouse gestures[1] many moons ago, then stopped using it for a few years). Glad you got it sorted…

[1] Scrivener also works great with mouse gestures (BTT Drawings), and it is a nice additional way to control it via BTT: for example I draw a C and trigger Compile, draw an R and trigger “Replace Media file” etc…

The four things I like most about it:

  • Better reliability: perhaps because it runs on top of the system rather than through it, it seems to do a better job of applying shortcuts to all menu commands. Apple’s system is dependent upon menus being observed or instantiated on application launch. Dynamic menus that are modified by the software while it runs can thus remain unmodified by shortcut requests until you look at the menu. BTT doesn’t care. You can assign a shortcut to Navigate ▸ Collections ▸ Binder, and now you have a reliable to switch off any binder sidebar no matter what and return to the full binder. It also has better control over menus that change their names and the ability to trigger commands based on their position. I have a hard time getting a shortcut on the “1. 2. 3.” list type, but it triggers fine if I use “Format;Lists;(10)”.
  • Sequence triggers: with a zillion shortcuts, sometimes typed in sequences are better. With the aforementioned list command, I don’t have a shortcut for that, I type in “1.” and BTT does the rest.
  • Chaining actions: you can use other things for this like Keyboard Maestro, but BTT makes it easy to attach multiple commands to one shortcut, and I find the process easier than making a macro if that’s all I want to do. For example, a shortcut to insert a linked image that is centre-aligned: first I invoke the shortcut to align the current paragraph to centre ([b]⇧⌘[/b]) and then trigger the Insert ▸ Image Linked to File… command.
  • Touch Bar support: if you have the hardware, you likely know it’s nearly useless, not because of any inherent qualities but because of implementations. Developers mainly put stuff in there that already has readily available shortcut keys, like a Bold button. BTT lets you make your own Touch Bars, so in addition to the F-keys you can also have a row of custom commands.

By “hard time” does that mean that it’s impossible to target those numbered lists with the native Shortcuts method, and the only way is something like the tool you’re describing? I’ve been trying for a while [EDIT: via the native method] and haven’t got it to work.

I can’t speak for native methods, as I haven’t made much use of them in recent years, for all of the above reasons and more, but I think I do recall it not working there either.

What I meant by that though is that ordinarily in BetterTouchTool you can just type out the menu path, like “Format;Lists;1. 2. 3.”, or “File;Back Up;Back Up To…”, but in this case it doesn’t work and I have to specify the “1. 2. 3.” type list command by its numerical position in the menu.

For what it is worth. I have had trouble in the past defining shortcuts in MacOS, thinking I had to define the whole ‘path’ (Format > Font > Baseline > Superscript).

All you need to do however is define one for Superscript (and/or Subscript).

Thanks for the info. I’ll look into BTT or similar.

I’ve tried all sorts of ways to target this ticked item here:

List menu.png

… but I don’t think it’s possible (or at least using any obvious approach) because of the numbers. I tried both no path and full path.

There are two spaces between 1. and 2. and again between 2. and 3.

That works for me.

Ah ha! Tricky (and silly) Apple. That indeed works in BTT as well. :mrgreen:

:smiley: !

Thanks a million! It works for me too!