update the hotkeys algorithm