Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow keys in text input cannot be remapped #211520

Open
musjj opened this issue Apr 27, 2024 · 4 comments
Open

Arrow keys in text input cannot be remapped #211520

musjj opened this issue Apr 27, 2024 · 4 comments
Labels
feature-request Request for new features or functionality keybindings VS Code keybinding issues

Comments

@musjj
Copy link

musjj commented Apr 27, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code version: Code 1.88.1 (e170252, 2024-04-10T17:34:12.840Z)
  • OS version: Linux x64 6.6.28

Steps to Reproduce:

keybindings.json

[
  {
    "key": "ctrl+b",
    "command": "cursorLeft",
    "when": "textInputFocus"
  },
  {
    "key": "left",
    "command": "-cursorLeft",
    "when": "textInputFocus"
  }
]

ctrl+b has no effect on text input boxes and left still functions anyways.

@alexdima
Copy link
Member

alexdima commented Jun 4, 2024

Most input boxes in vscode are native <input> elements and not implemented via code editors. These keybinding rules work for the input boxes backed by a code editor, such as the SCM input, extension search input, debug console, but not all inputs in vscode need rich functionality.

@alexdima alexdima added feature-request Request for new features or functionality keybindings VS Code keybinding issues labels Jun 4, 2024
@alexdima alexdima removed their assignment Jun 4, 2024
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Jun 4, 2024
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@spartanatreyu
Copy link

@musjj What's the use case for wanting Ctrl+b to be cursor left?

Is this an emacs-ism?

If so, would it be better to implement this at the userspace level so it works on all the user's programs? Something like an AutoHotkey script or MacOS's built-in shortcuts?

@musjj
Copy link
Author

musjj commented Jun 8, 2024

It's more of a readline-ism (bash, etc.). I think using external solutions like AHK wouldn't work very well, because you want the shortcut to be active only in input boxes and I don't think there's a way to detect that. Also, I'm on Linux and I don't think there's anything like AHK yet here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality keybindings VS Code keybinding issues
Projects
None yet
Development

No branches or pull requests

4 participants