Creating a keyboard shortcut: how to discover the command needed for a particular action?


[context] The problem I solved:

I want a keyboard shortcut for the “Edit: Lines: Auto Indent” command. (In the Command Palette, it’s “Editor: Auto Indent”.)

This command doesn’t already have a keyboard shortcut, so examining the list of existing shortcuts didn’t help me discover the applicable command.

(I determined through pure trial and error that it’s ‘editor:auto-indent’.)

My question:

How can I look up what command a menu item or a Command Palette event is sending to the editor?