question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ctrl + Shift + {Left, Right, Home, End} is broken after a terminal is opened & closed

See original GitHub issue

OS/Web Information

  • Web Browser: Mozilla Firefox 88.0.1 (88.0.1+build1-0ubuntu0.20.04.2)
  • Local OS: Ubuntu 20.04
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: AMD64
  • code-server --version: 3.10.2 387b12ef4ca404ffd39d84834e1f0776e9e3c005

Steps to Reproduce

  1. With a freshly opened window, open a file with some text in it.
    • Try using Ctrl + Shift + Right, text should be selected at word boundaries.
  2. Open a terminal, then close it using exit command.
  3. Try using Ctrl + Shift + Right again.

Expected

Text should be selected at word boundaries.

Actual

No text is selected. Cursor doesn’t move at all.

Logs

Notes

This issue can be reproduced in VS Code: No (Version: 1.57.0-insider, Commit: 1082913dd012e21cc5f35a06f15c480ca447f67f)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
code-ashercommented, Jun 1, 2021

I’m able to reproduce. Maybe it’s because of the Terminal: Resize Pane Right keybinding that’s bound to ctrl+shift+right in the terminal.

On Firefox when the terminal is closed there’s a bug where the close isn’t actually registered so maybe it still thinks the terminalFocus condition is true.

One workaround is to unbind it for now:

[
    {
        "key": "ctrl+shift+right",
        "command": "-workbench.action.terminal.resizePaneRight",
        "when": "terminalFocus && terminalProcessSupported"
    }
]

Possibly related: https://github.com/cdr/code-server/issues/1615

1reaction
peat-psuwitcommented, Jun 1, 2021

I’ve retested with an empty --user-data-dir; the problem still persists. So it can’t be extensions or custom keybindings.

But from the window log, this looks suspicious:

[2021-05-28 23:13:16.294] [window] [info] [KeybindingService]: | Resolving ctrl+shift+[ArrowRight]
[2021-05-28 23:13:16.300] [window] [info] [KeybindingService]: \ From 2 keybinding entries, matched workbench.action.terminal.resizePaneRight, when: terminalFocus && terminalProcessSupported, source: built-in.

The terminal is not opened at that point.

On macOS, I think the fact that there’s some kind of Ctrl -> Cmd keybinding difference might cause the issue to not appear. You may have better luck reproducing it on Windows (if you can’t find a Linux/Ubuntu machine, that is).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ctrl + Shift + {Left, Right, Home, End} is broken after a terminal ...
Open a terminal, then close it using exit command. Try using Ctrl + Shift + Right again. Expected. Text should be selected at...
Read more >
my left ctrl key stopped working in win shortcuts (but still works
4. Right-click on Key.reg and select Merge; 5. Click Ok> Yes> Yes. 6. Restart the system. If the behavior persists, proceed to the...
Read more >
Keyboard shortcuts for Windows - Visual Studio Code
Ctrl +P. Quick Open, Go to File… Ctrl+Shift+N. New window/instance ... Ctrl+End. Go to end of file. Ctrl+↑ / ↓. Scroll line up/down....
Read more >
VSCode some shortcuts not working properly - Stack Overflow
I am developing in Java. The most common shortcut, "go to definition" F12 and "auto fix" ctrl+dot I tested it on another computer...
Read more >
Make Home & End keys behave like Windows on Mac OS X
Ctrl Home and Ctrl End will go to start and end of document; Shift Ctrl Home and Shift Ctrl End will select to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found