Code change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: git commit (1 Dec 2021), with openvscode-server patches until commit Browser: Firefox OS Version: Ubuntu 20.04 Steps to Reproduce: a freshly opened window, open or type some text in it. Try using Ctrl + Shift + Right, text should be selected at word boundaries. a terminal, then close it using command. using Ctrl + Shift + Right again. Expected: Text should be selected at word boundaries. Actual: No text is selected. Cursor doesn't move at all. This is the the same issue as filed at [1] and [2]. If it's reproducible in 3 server implementations (counting openvscode-server), then it's probably an upstream issue. Sadly I don't have an access to GitHub Codespaces, so I can't verify it with an "official" implementation [3]. You'll notice in keyboard troubleshooting log below the following 2 lines: It's been suggested in [1] that vscode might still think that is active despite the terminal is closed. Thus, a workaround I've been using is to have the following in (with default unbind): That is, wherever exists, augment it with . [3] I mean, doesn't have terminals. I've tried using Live Share; that doesn't change. See Keyboard shortcuts troubleshooting. The first keypress is before the terminal is opened. The other two are after it's closed. <details<pre[2021-12-03 01:36:00.490] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control [2021-12-03 01:36:00.503] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl') [2021-12-03 01:36:00.509] [window] [info] [KeybindingService]:  Keyboard event cannot be dispatched in keydown phase. [2021-12-03 01:36:00.513] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 16, key: Shift [2021-12-03 01:36:00.517] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 4 ('Shift') [2021-12-03 01:36:00.521] [window] [info] [KeybindingService]:  Keyboard event cannot be dispatched in keydown phase. [2021-12-03 01:36:00.808] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 37, key: ArrowLeft [2021-12-03 01:36:00.813] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 15 ('LeftArrow') [2021-12-03 01:36:00.817] [window] [info] [KeybindingService]: | Resolving ctrl+shift+[ArrowLeft] [2021-12-03 01:36:00.821] [window] [info] [KeybindingService]:  From 2 keybinding entries, matched cursorWordLeftSelect, when: textInputFocus, source: built-in. [2021-12-03 01:36:01.146] [window] [info] [KeybindingService]: + Ignoring single modifier shift due to it being pressed together with other keys. [2021-12-03 01:36:03.304] [window] [info] [KeybindingService]: | Resolving [KeyE] [2021-12-03 01:36:03.310] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:03.401] [window] [info] [KeybindingService]: | Resolving [KeyE] [2021-12-03 01:36:03.406] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:03.737] [window] [info] [KeybindingService]: | Resolving [KeyX] [2021-12-03 01:36:03.744] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:03.832] [window] [info] [KeybindingService]: | Resolving [KeyX] [2021-12-03 01:36:03.838] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:04.210] [window] [info] [KeybindingService]: | Resolving [KeyI] [2021-12-03 01:36:04.218] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:04.344] [window] [info] [KeybindingService]: | Resolving [KeyI] [2021-12-03 01:36:04.348] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:04.396] [window] [info] [KeybindingService]: | Resolving [KeyT] [2021-12-03 01:36:04.404] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:04.518] [window] [info] [KeybindingService]: | Resolving [KeyT] [2021-12-03 01:36:04.523] [window] [info] [KeybindingService]:  No keybinding entries. [2021-12-03 01:36:04.762] [window] [info] [KeybindingService]: | Resolving [Enter] [2021-12-03 01:36:04.769] [window] [info] [KeybindingService]:  From 20 keybinding entries, no when clauses matched the context. [2021-12-03 01:36:04.824] [window] [info] [KeybindingService]: | Resolving [Enter] [2021-12-03 01:36:04.827] [window] [info] [KeybindingService]:  From 20 keybinding entries, no when clauses matched the context. [2021-12-03 01:36:06.677] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control [2021-12-03 01:36:06.685] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl') [2021-12-03 01:36:06.689] [window] [info] [KeybindingService]:  Keyboard event cannot be dispatched in keydown phase. [2021-12-03 01:36:06.692] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 16, key: Shift [2021-12-03 01:36:06.696] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 4 ('Shift') [2021-12-03 01:36:06.700] [window] [info] [KeybindingService]:  Keyboard event cannot be dispatched in keydown phase. [2021-12-03 01:36:06.766] [window] [error] Cannot refresh property when process is undefined: [2021-12-03 01:36:07.142] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 37, key: ArrowLeft [2021-12-03 01:36:07.147] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 15 ('LeftArrow') [2021-12-03 01:36:07.151] [window] [info] [KeybindingService]: | Resolving ctrl+shift+[ArrowLeft] [2021-12-03 01:36:07.155] [window] [info] [KeybindingService]:  From 2 keybinding entries, matched , when: terminalFocus && terminalHasBeenCreated terminalFocus && terminalProcessSupported, source: built-in. [2021-12-03 01:36:07.913] [window] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 37, key: ArrowLeft [2021-12-03 01:36:07.920] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ArrowLeft, keyCode: 15 ('LeftArrow') [2021-12-03 01:36:07.925] [window] [info] [KeybindingService]: | Resolving ctrl+shift+[ArrowLeft] [2021-12-03 01:36:07.930] [window] [info] [KeybindingService]:  From 2 keybinding entries, matched , when: terminalFocus && terminalHasBeenCreated terminalFocus && terminalProcessSupported, source: built-in. [2021-12-03 01:36:08.344] [window] [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys. </pre</details
I can't reproduce this issue in Firefox or Safari.
you mentioned Safari, which implied that you have macOS. Could you please re-try using Linux or Windows? macOS uses Command key for those keybindings, and so duplicated keybindings doesn't exist. Folks at cdr/code-server can't reproduce it on macOS either, but subsequently can reproduce it on Linux. Please re-open this issue.
doesn't reproduce for me there either !
That looks like Microsoft Edge, based on Chromium engine. Could you please try again on Firefox?
I can reproduce this in Ubuntu/Firefox
Does not repro on Ubuntu/Edge
Created a PR with a workaround

Related discussion:
text: } this.xterm?.dispose(); <ins> // HACK: Workaround for Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=559561, // as 'blur' event in xterm.raw.textarea is not triggered on xterm.dispose() // See https://github.com/microsoft/vscode/issues/138358 if (isFirefox) { this._terminalFocusContextKey.reset(); this._terminalHasTextContextKey.reset(); this._onDidBlur.fire(this); } </ins> if (this._pressAnyKeyToCloseListener) { this._pressAnyKeyToCloseListener.dispose(); this._pressAnyKeyToCloseListener = undefined;