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

Feature Request: Support arbitrary arguments for keybindings #1142

Open
zadjii-msft opened this issue Jun 4, 2019 · 0 comments

Comments

@zadjii-msft
Copy link
Member

commented Jun 4, 2019

From discussion with @carlos-zamora and @DHowett-MSFT, and possibly in #968

Keybindings need to support arbitrary args, so that the handlers can parse their own arg values.

{
    keys: ["ctrl+shift+c"],
    action: copy,
    args:{
        type: "mungeData"
    }
},
{
    keys: ["ctrl+shift+pgup"],
    action: scroll,
    args:{
        amount: -1
    }
}

This is a feature that needs to absolutely be spec'd before implemented.

@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Jun 4, 2019
@zadjii-msft zadjii-msft added this to Spec Needed ❓ in Specification Tracker via automation Jun 4, 2019
@msftbot msftbot bot added the Needs-Triage label Jun 4, 2019
@zadjii-msft zadjii-msft moved this from Spec Needed ❓ to Spec In Progress ✏ in Specification Tracker Jun 19, 2019
zadjii-msft added a commit that referenced this issue Jun 20, 2019
  Specs #1142.

  Just read the spec :)
@zadjii-msft zadjii-msft referenced this issue Jun 20, 2019
1 of 1 task complete
@zadjii-msft zadjii-msft moved this from Spec In Progress ✏ to Spec In Review ⏰ in Specification Tracker Jun 20, 2019
zadjii-msft added a commit that referenced this issue Aug 16, 2019
* Add a spec draft for Keybindings Arguments.

  Specs #1142.

  Just read the spec :)

* Apply suggestions from code review

Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>

* Include notes on reliability, security, and `Handle`ing Keybinding Args

* Add some extra details from review

  * Split up ActionArgs and ActionEventArgs
  * Clarify _not_ handling an action
  * Add some notes on parsing args
  * Add some future considerations on extensions

* Updating spec to remove the bulk of the `IActionArgs` and `IActionEventArgs` implementations, as they're redundant.
DHowett-MSFT added a commit that referenced this issue Aug 16, 2019
This commit also transitions our keybinding events and event handlers to a
TypedEventHandler model with an "event args" class, as specified in the
keybinding arguments specification (#1349). In short, every event can be marked
Handled independently, and a Handled event will stop bubbling out to the
terminal. An unhandled event will be passed off to the terminal as a standard
keypress.

This unifies our keybinding event model and provides a convenient place for
binding arguments to live.

Fixes #2285.
Related to #1349, #1142.
@zadjii-msft zadjii-msft moved this from Spec In Review ⏰ to Spec Accepted! 🎉 in Specification Tracker Aug 20, 2019
@zadjii-msft zadjii-msft self-assigned this Aug 22, 2019
@carlos-zamora carlos-zamora referenced this issue Sep 21, 2019
0 of 5 tasks complete
@zadjii-msft zadjii-msft referenced this issue Oct 4, 2019
4 of 19 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Specification Tracker
  
Spec Accepted! 🎉
2 participants
You can’t perform that action at this time.