Change checkForShortcut to return variable