**Related wish: [[ https://meta.wikimedia.org/wiki/Community_Wishlist/W141 | W141: Editing mathematics is too difficult ]]**
One idea we had was to add a keyboard shortcut and toolbar button to insert `<math></math>` and put the cursor in the middle. This should reduce the manual strain of having to type `<math>` over and over. This seems pretty useful and non-controversial.
**Acceptance criteria**
If the #math extension is installed:
* The #WikiEditor toolbar should have two buttons, both in the "Insert" group of the "Advanced" section:
** "Math formula (inline)" with the keyboard shortcut `Ctrl-m` (or `Command-m` on Mac).
** "Math formula (block)" (no keyboard shortcut for WikiEditor-only)
* Keyboard shortcuts for #CodeMirror, documented in the help dialog (available by pressing `Ctrl-Shift-/` (or `Cmd-Shift-/` on Mac)
** `Ctrl-m` (or `Command-m` on Mac) for inline
** `Shift-Ctrl-m` for block
Clicking on the button or using the keyboard shortcut should insert `<math display="inline"></math>` (or `<math display="block"></math>`) and place the cursor in between the opening and closing tags.
**Related**: {T419104}