I am using VS Code with arduino extension which has Serial Monitor Window. To toggle that window right now I have to do Ctr+Shift+P and then select View: Toggle Terminal. which only works if I have Terminal and Serial Monitor on Same panel.
But I want to use Shortcut Menu bar to do the same and it needs command there so how do we find which command actually used to toggle Serial Monitor view?
You can find all commands name on the extension page
In you case the command is
arduino.openSerialMonitor