3.0 add usage of ESC

Ref to #224 .
Add the possibility to close panels then collapse sidebar with Esc.

Either I'd like to see a small comment on what this function does or may be change the literal 27 with a preset variable named EscKey, so it is more clear without looking up a key code cheat sheet:smiley_cat: