It's okay, I found the keymap-desktop.json file. Either he wasn't there when I looked, or I was tired 
So I added the favsToggleVisibility line and after restarting Joplin I was able to add a keyboard shortcut 
It would be handy to have a button or shortcut to toggle all the panels at once. This is what @nickzeff's code seems to do but I don't dare put too much code manually at the moment.