Derma toggle on/off?

How can i make my derma menu be toggled on/off when a player press f4 for example?

https://github.com/garrynewman/garrysmod/blob/ff51a59d5a821dec3c8f524631c86150b3e4744d/garrysmod/lua/includes/extensions/client/panel.lua#L370