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

Bind directional hjkl for the Problems panel #211297

Closed
musjj opened this issue Apr 24, 2024 · 5 comments · Fixed by #211324
Closed

Bind directional hjkl for the Problems panel #211297

musjj opened this issue Apr 24, 2024 · 5 comments · Fixed by #211324
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug error-list Problems view insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@musjj
Copy link

musjj commented Apr 24, 2024

I'm trying to bind a vim-style hjkl mapping in the Problems panel as a substitute for directional arrow keys, but it doesn't seem to be possible right now.

Exposing the directional commands for the Problems panel just like list.focus{Up,Down}, list.{expand,collapse}, etc. would be a really great feature.

@ArturoDent
Copy link

ArturoDent commented Apr 24, 2024

See your SO question for a possible answer: https://stackoverflow.com/a/78381623/836330

But it seems to me that the list focus commands should work when the list of the Problems view is focused, see #20440.

So this "might" be a bug, but these more specific keybindings do work:

{
  "key": "k",
  "command": "list.focusUp",
  // "when": "workbench.panel.markers.view.active"
  "when": "listFocus && !inputFocus && !treestickyScrollFocused"
},

{
  "key": "j",
  "command": "list.focusDown",
  // "when": "workbench.panel.markers.view.active"
  "when": "listFocus && !inputFocus && !treestickyScrollFocused"
}

@starball5
Copy link

Copying my comment from SO:

when I tried, I used the default when clause- listFocus && !inputFocus && !treestickyScrollFocused, which had the issue of the filter getting focus for typing when key had no modifiers.

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug error-list Problems view labels Apr 25, 2024
@sandy081 sandy081 added this to the April 2024 milestone Apr 25, 2024
sandy081 added a commit that referenced this issue Apr 25, 2024
sandy081 added a commit that referenced this issue Apr 25, 2024
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Apr 25, 2024
@musjj
Copy link
Author

musjj commented Apr 25, 2024

Thanks for the fix, I'll try it out on the next update.

For now, I'm using the following workaround from the stackoverflow post:

{
  "key": "k",
  "command": "list.focusUp",
  "when": "focusedView == 'workbench.panel.markers.view'"
},
{
  "key": "j",
  "command": "list.focusDown",
  "when": "focusedView == 'workbench.panel.markers.view'"
},
{
  "key": "h",
  "command": "runCommands",
  "args": {
    "commands": [
      "list.collapse",
      "widgetNavigation.focusNext"
    ]
  },
  "when": "focusedView == 'workbench.panel.markers.view'"
},
{
  "key": "l",
  "command": "runCommands",
  "args": {
    "commands": [
      "list.expand",
      "widgetNavigation.focusNext"
    ]
  },
  "when": "focusedView == 'workbench.panel.markers.view'"
}

The widgetNavigation.focusNext seems to be necessary because list.expand somehow focuses the filter box, but only with my custom binding ({Left,Right}Arrow doesn't cause a focus change). Not sure if the commit above fixes this issue.

@sandy081 sandy081 added the author-verification-requested Issues potentially verifiable by issue author label Apr 25, 2024
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 25, 2024
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@musjj, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 3415990 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@musjj
Copy link
Author

musjj commented Apr 28, 2024

Works perfectly in code insiders, thanks for the fix! (collapse/expand also works without using the hack above).
/verified

@VSCodeTriageBot VSCodeTriageBot removed the author-verification-requested Issues potentially verifiable by issue author label Apr 28, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 9, 2024
nang-dev pushed a commit to trypear/pearai-app that referenced this issue Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug error-list Problems view insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants