First step would be to create scripts to connect and disconnect WiFi hotspot. See this Q&A for options: How to connect to WiFi from the command line?
To see list of available WiFi hotspots ()
nmcli d wifi list
Sample Script to connect:
#!/bin/bash
nmcli d connect <WifiInterface>
Sample Script to disconnect:
#!/bin/bash
nmcli d disconnect <WifiInterface>
Marks the scripts as executable with chmod
:
sudo chmod a+x /path/to/script-name
Assign shortcut keys to scripts: How do I setup keyboard macros?
NOTE: Have your password automatically saved with your WiFi profile so it doesn't have to be reentered every time it is started up.