refactoring of hotkey handling, now almost totally modular