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

Allow to configure cursor keys for input fields #64694

Open
serialprimate opened this issue Dec 9, 2018 · 11 comments
Open

Allow to configure cursor keys for input fields #64694

serialprimate opened this issue Dec 9, 2018 · 11 comments
Labels
feature-request Request for new features or functionality keybindings VS Code keybinding issues
Milestone

Comments

@serialprimate
Copy link

serialprimate commented Dec 9, 2018

Version 1.29.1 Linux 64 bit

Consistency issue.

Steps to Reproduce:

  1. Configure anything (e.g. Ctrl+B) for cursorLeft (Global)
  2. Find all other conflicting key bindsings and remove them.
  3. Observe that key works in an editor.
  4. Open Search Bar (for example) or Find Widget (for another example) or search boxes.
  5. Observe cursorLeft does not work in text boxes.

Only a finite subset of (generic named e.g cursor*, delete*) shortcuts are required if this is to be fixed. I do realise that sometimes these things can be tricky, especially if using stock widgets for these.

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

@vscodebot vscodebot bot added the editor-find Editor find operations label Dec 9, 2018
@jrieken
Copy link
Member

jrieken commented Dec 10, 2018

Assuming @bpasero owns the InputBox

@bpasero bpasero added feature-request Request for new features or functionality keybindings VS Code keybinding issues and removed editor-find Editor find operations labels Dec 10, 2018
@bpasero bpasero removed their assignment Dec 10, 2018
@bpasero bpasero changed the title Navigation Shortcuts Not Working in Text Boxes Etc Allow to configure cursor keys for input fields Dec 10, 2018
@ethanyu336
Copy link

yeah, I also want this,
configure binding in not only
Find Widget, but also in Quick Open,

@russelldavis
Copy link
Contributor

russelldavis commented Jul 22, 2019

I discovered a workaround: if you add "when": "textInputFocus" to the keybinding definition (run Open Keyboard Shortcuts (JSON) in the Command Pallete), these keybindings will start working in input fields.

So, the actual issue seems to be that certain keybindings without a when clause aren't truly global like they should be.

@bpasero it seems this should be labeled as bug rather than feature-request.

EDIT: That's not quite right. What's actually happening is that, without the when clause, vscode applies the cursor movement to the current editor rather than the focused input field. With the when clause, the custom binding doesn't actually apply at all (these input fields match inputFocus but not textInputFocus), and vscode falls back to a default behavior (probably the OS key bindings behavior), which in my case was close enough to what I was remapping it to that I hadn't noticed the difference.

So, my "workaround" is even less useful than I'd thought.

Also, any chance this can get some attention? It's been reported many times over the years:

#7433
#11950
#65578

@russelldavis
Copy link
Contributor

(Was mistaken about the workaround, edited above.)

@eriegz
Copy link

eriegz commented Feb 16, 2021

Would love to get an update on this issue! This causes me daily frustration.

@serialprimate
Copy link
Author

@bpasero It would also be cool if basic editing shortcuts were also consistent where they make sense. e.g. select, nav, delete etc. Not just cursor keys. The original intent was lost by your change of the request title in Dec 2018.

@ArturoDent
Copy link

Also see #175444

@alonso-herreros
Copy link

+1. I am getting used to alt+hjkl for navigation and this is a bit of a bummer.

@jcuffe
Copy link

jcuffe commented Mar 1, 2024

+1 more, would appreciate the ability to rebind cursor navigation consistently across all widgets that display a cursor!

@gsisson
Copy link

gsisson commented Mar 22, 2024

+1 as I would also appreciate rebinding cursor nav keys in the findWidget. Frustrating that typing ^F ^B ^A ^E won't move the cursor as in emacs. I could swear it used to work fine for years, but now doesn't seem to work anymore. I tried to re-map the keys "when findWidgetVisible" and found that it doesn't work. Would be very nice to get fixed! Thanks!

@bobslee
Copy link

bobslee commented May 26, 2024

+1 Absolutely a necessity!
It's so misleading, inconsistent and frustrating those input keybindings can't be set.
Coming from Emacs made me really freaked out when experiencing this issue/lack.
I assume lots of devs experience this particular issue.

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

13 participants