3.0 add usage of ESC

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

A comment `// Check for ESC key` or sth might suffice.