Rework hotkey function for modularity