# Custom cursor placing when using keyboard shortcuts

This is not about new macros like \newcommand, \def and others.

This is not about autocompletion like using .cwl (in TexStudio)

This is also not about using shortcuts for predefined commands that are listed in the shortcuts sections.

None of the questions I could find here have answered this. I want to make a macro in TexStudio for various kinds of mathematics, but when I execute them I want to choose where the cursor goes.

For example, I know how to make a macro that would give me two modulus signs, so that when hitting ctrl + F2 (or the like) I get:

| |


Woopee, but now the cursor is to the right, and not actually in between the modulus signs.

( For an example of what I want to do, when you type Ctrl + Shift + m, such a command is executed, you get




With the cursor ready to insert the math inbetween. )

Do you guys reckon it's possible to do this?

Specifically, the string %| in a macro decides where the cursor ends up, so if you go to Macros --> Edit macros, and make a new one where the LaTeX content is
|%||