small refactoring: if-elseif-elseif into switch-case for keyboard shortcuts