I use LyX especially for writing math, and I created my own bind file for my preferred shortcuts.
Among other commands, I defined shortcuts that insert a command-sequence, for inserting long data easily. for example, I have the following shortcut assigned:
\bind "C-S-L x 1 n" "command-sequence self-insert x; math-subscript; self-insert 1; char-forward; self-insert ,; math-insert \ldots; self-insert ,; self-insert x; math-subscript; self-insert n; char-forward;"
This sequence generates a list of variables, named x_1 to x_n, separated by dots and commas. As can be seen, I use a shortcut that defines exactly the variable type I want to insert, and the needed range for the sequeunce. Soon enough, I realized I want all sorts of these sequences that only differ in their variable name ('x', here) and their range (1 to n, here).
My question is - is there any way to define a 'dynamic' shortcut, in that sense it will generate the wanted sequence according to three given arguments, instead of defining each of these as a separate shortcut?
Thanks for the help.