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

Leave waiting for second part of a chord state after some time #44847

Closed
alexdima opened this issue Mar 1, 2018 · 2 comments
Closed

Leave waiting for second part of a chord state after some time #44847

alexdima opened this issue Mar 1, 2018 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality keybindings VS Code keybinding issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Mar 1, 2018

  • trigger a chord (e.g. cmd+k)
  • go drink coffee or focus out of VS Code
  • VS Code should eventually (on its own) leave this state
  • The rationale is that the user will have forgotten that a chord was triggered by the time they return.
@alexdima alexdima added the keybindings VS Code keybinding issues label Mar 1, 2018
@alexdima alexdima self-assigned this Mar 1, 2018
@alexdima alexdima added this to the On Deck milestone Mar 1, 2018
@fabiospampinato
Copy link
Contributor

That's a funny rationale, another one is that if you clear the terminal immediately on cmd+k, and 10ms later the user completes the chord shortcut, the user could find himself with a cleared-out terminal when maybe he just wanted to toggle the sidebar.

Thinking more about this I realized that there's no way to differentiate between cmd+k cmd+b (2 independent shortcuts) and cmd+k cmd+b (1 chord shortcut) with time alone, so I guess this won't be a perfect solution.

Another option would be to wait until cmd gets released, or the chord completed, when triggering cmd+k.

Another option would be mind reading, but I've no idea who to implement that, yet.

What do you think is the best option here, just to keep it the way it is and leave the user with an accidentally cleared-out terminal?

@alexdima
Copy link
Member Author

alexdima commented Mar 2, 2018

@fabiospampinato

Without any keybinding customizations, without anything to do with the terminal, if you are focused in the editor and press cmd+k, the keybinding service will set a field (state) such that it enters into chord mode and the next keypress will be interpreted as a second part of a chord. This is reflected in the status bar message:

image

This issue I have created here is about clearing that state after an amount of time or when focus leaves VSCode.

@alexdima alexdima added the feature-request Request for new features or functionality label Apr 19, 2018
@alexdima alexdima modified the milestones: On Deck, May 2018 Apr 27, 2018
@alexdima alexdima added the verification-needed Verification of issue is requested label May 29, 2018
@isidorn isidorn added the verified Verification succeeded label May 29, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality keybindings VS Code keybinding issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants