first_pan->flags |= SHOW; // show the panel
first_pan->flags &= ~SHOW; // hide the panel

You can also use the macros set and reset.
They do the very same thing but are probably easier to memorize:
set(first_pan, SHOW);
reset(first_pan, SHOW);

Search the manual for "Input events". There you will see how to assign functions to keys and so on (basically it's just 'on_key = function').