convert handling shortcut keys to switch