Use Keyboard Maestro to trigger an appropriate shortcut, which then changes the focus mode using the Set Focus action.