Change:
Testing an editor and write something in it. tab until you reach the terminal. Type something in the terminal. . Realize that tab is correctly not moving focus in the terminal. command "Toggle Tab Key Moves Focus" out of the terminal and keep tabbing until you get back to your editor. something in the editor. again until you reach the terminal. something in the terminal. to tab out of the terminal. It looks like tab moves focus as toggled itself off. Tab moves focus seems to be off for both terminal and editor at this point until reload.
I can also cause similar behavior if I flip the settings.
what is supposed to happen now? What I think I expect to happen (and isn't happening): If I run "Toggle tab key moves focus" while in a place where it doesn't move focus via setting, then it now globally moves focus. If I run "Toggle tab key moves focus" while in a place where it does move focus, then it now globally does not move focus. However, I'm not a "tab moves focus" user, so maybe my expectations are bogus.
Thank you for testing. Those expectations are correct, except that the toggling does not apply globally - it is per area. So, if I have in settings: terminal tab focus mode: on editor tab focus mode: off where: = status bar indicator = no status bar indicator focus the terminal focus the editor focus the terminal and toggle it off focus the editor and toggle it on focus the terminal focus the editor reload the window and focus the terminal focus the editor I see that this is not working atm because I'm not reacting to configuration changes
fyi for easier testing since the command palette can cause the terminal to no longer be focused, I'd suggest using the keybinding to toggle tab focus mode

Discussion:
import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEditorInput'; import { AutomaticLanguageDetectionLikelyWrongClassification, AutomaticLanguageDetectionLikelyWrongId, IAutomaticLanguageDetectionLikelyWrongData, ILanguageDetectionService } from 'vs/workbench/services/languageDetection/common/languageDetectionWorkerService'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; <ins> import { TerminalSettingId } from 'vs/platform/terminal/common/terminal'; </ins> class SideBySideEditorEncodingSupport implements IEncodingSupport { constructor(private primary: IEncodingSupport, private secondary: IEncodingSupport) { }

@ITextFileService private readonly textFileService: ITextFileService, @IStatusbarService private readonly statusbarService: IStatusbarService, @IInstantiationService private readonly instantiationService: IInstantiationService, <del> @IContextKeyService private readonly contextKeyService: IContextKeyService </del> <ins> @IContextKeyService private readonly contextKeyService: IContextKeyService, @IConfigurationService private readonly configurationService: IConfigurationService </ins> ) { super();

this.onTabFocusModeChange(); } })); <ins> this._register(this.configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration('editor.tabFocusMode')) { TabFocus.setTabFocusMode(this.configurationService.getValue('editor.tabFocusMode'), TabFocusContext.Editor); this.onTabFocusModeChange(); } else if (e.affectsConfiguration(TerminalSettingId.TabFocusMode)) { TabFocus.setTabFocusMode(this.configurationService.getValue(TerminalSettingId.TabFocusMode), TabFocusContext.Terminal); this.onTabFocusModeChange(); } })); </ins> } private registerCommands(): void {

private onTabFocusModeChange(): void { const info: StateDelta = { type: 'tabFocusMode', tabFocusMode: TabFocus.getTabFocusMode(this.contextKeyService.getContextKeyValue('focusedView') === 'terminal' ? TabFocusContext.Terminal : TabFocusContext.Editor) }; this.updateState(info); }