Add global eventhandler for toggling the sidebar