with hotkey handling - not tested