Shortcut to insert a list

Is there any shortcut to insert a list? For example, if I input 1. then it will automatically recognize it should be an ordered list, or if I input [code]

[/code], then it will automatically recognize it as an unordered list.

There’s no auto-recognition of a list style the way you’re describing, but you can use the keyboard to quickly access list styles a couple of ways. If there’s a particular format you use frequently, you can create a shortcut for it directly within the macOS System Preferences, as explained in this knowledge base article. The easiest way to do that for the bullet styles is to select the formatting in Scrivener so that it makes the first bullet, then select and copy that to paste into the field identifying the menu item name in the keyboard preference pane. Note that the number styles use use two spaces between the numbers in the menu name, so e.g. you’d use “1.[space][space]2.[space][space]3.” to assign a shortcut to that style.

Alternatively, you can use a shortcut to access the menu bar and then the keyboard to further navigate to the list menu item you want. Using ⌘? will open the help menu ready for typing; you can then enter “lists” and it will bring up the first ten hits, which include all the bullet styles, for easy access via the arrow keys. ⌃F2 is the default macOS shortcut for focusing the menu bar, and from there you can use arrow keys or typing (e.g. typing “Format” once the menu bar has focus will highlight that menu, then pressing Return and typing L will jump straight to Lists). These options aren’t as speedy as a specific shortcut, but they don’t require assigning or memorizing a dedicated key combo, so they may be useful if you’re mainly trying to avoid the need to mouse around.