Refactor and reuse global shortcut code (win)