Go to View > Messages Pane:
Then click on the "Settings" tab in the bottom right corner:
Then click on the "Selected" radio button:
Then double click on "User commands" so that "no" turns to "yes":
Then click on the "Output" tab:
Then do the action that you want to copy the shortcut of. In this case, insert your horizontal line. In the output tab at the bottom, you will see:
This tell us that the correct command is:
inset-insert line CommandInset line LatexCommand rule offset "0.5ex" width "100col%" height "1pt" \end_inset
Verify that the command is correct by inserting it directly into the mini buffer (Alt + X or View > Toolbars > Command Buffer) at the bottom of the screen:
Run the command by pressing return. If it has the desired effect, then you know you have the right command and can create the shortcut in the usual way.
Note that you can have one shortcut do multiple commands by using command-sequence
.
I think I found the answer...
What we have to do if we want to change the alignment by keyboard shortcut is this:
Alt+A+C
- To the center.
Alt+A+L
- To the left.
Alt+A+R
- To the right.
And we can change it by: Tools->Preferences->Editing->Shortcuts and at search box we can write align
and change what we want.
Best Answer
you can create your own shortcut in: Tools -> preferences -> Editing -> shortcuts and there you can create your own shortcut for this and anything else you will need.