refactor and move keyboard shortcuts to a new source file