Skip to content

Is it possible to listen to events of an inputbox? #426

Closed

Description

If I accept input using

window.showInputBox();

Is there any way I can listen to key change events? I am writing an extension and I want to accept an input from the user and I want to autocomplete when the user hits tab like most terminals. If this is not possible inside the inputbox is there any other control I can use to achieve this?

Activity

  1. added
    feature-request
    on Nov 23, 2015
  2. bpasero commented on Nov 23, 2015

    @bpasero
    Contributor

    Mithun Patel (@mithun-daa) currently not, but it seems you want a lot more, also the ability to alter the input after the call to showInputBox.

  3. added
    help wanted
    on Nov 23, 2015
  4. added and removed
    help wanted
    on Dec 16, 2015
  5. jeffyoung commented on May 10, 2016

    @jeffyoung

    Perhaps hidden in #3579 was the request for an extension to have this functionality as a part of the command structure (and not particular to an input box). In that issue, it is described that an extension author may want to have command 'options' show up as they type a command name. For instance, given commands today that are hard-coded as:

    team create bug
    team create task
    team create work item

    The functionality I'm looking for would be for the command palette to show "team create" by default and when "team create" was either completed (or the only command option left based on matching) would the values "bug", "task" and "work item" would appear. This allows extension developers to provide "dynamic" commands.

    In addition (or maybe alternatively), it would be welcome for a command to take a variable number of arguments. The command that gets called could then take action based on what was passed in to the command. In the example above, the command could be "team create", then one of the 3 options would appear, and the user could type even more values (that would be passed to the command that was selected).

  6. 17twenty commented on Jul 12, 2016

    @17twenty

    I thought i'd give it a go at writing an extension to improve fast file searching (see https://github.com/17twenty/fzf-go ) but without a way to get events from the inputbox it's pretty useless.
    The part I don't get is that the functionality already exists as a number of the existing dialogs use the concept.

    I want to be able to take an input, shell out and get results based on that input, and then as the input changes do more processing etc..

    +-------------------------------------------+
    |                                           |
    | > Enter file parts here                   |
    |                                           |
    +-------------------------------------------+
    | Downloads/lol_frontend.png                |
    | Downloads/nicetrace.go                    |
    | Downloads/BuildingSoftwareProductsInAWeeke|
    | Downloads/TheOpportunityAnalysisCanvas.pdf|
    | Downloads/9781785286421-PRACTICAL_LINUX_SE|
    | Downloads/google-apps-security-and-complia|
    +-------------------------------------------+
    
    
  7. atian25 commented on Oct 18, 2016

    @atian25

    any progress of this ?

  8. pajoma commented on Dec 15, 2016

    @pajoma

    Being able to have any input in the QuickPickList would be also needed for my extension.

  9. johnfn commented on Jan 15, 2017

    @johnfn
    Contributor

    Pretty please? Vim users will love you forever.

  10. 1 remaining item

  11. paul-enz commented on Jun 23, 2017

    @paul-enz

    This would also open up for navigating file directories like the C-x C-f of EMACS

  12. removed their assignment
    on Sep 5, 2017
  13. KristjanTammekivi commented on Nov 21, 2017

    @KristjanTammekivi

    bump Peng Lyu (@rebornix) was interested in doing it, and it would clear the way for #23169

  14. noobling commented on Dec 10, 2017

    @noobling

    +1

  15. mgambati commented on Dec 31, 2017

    @mgambati

    +1

  16. bpasero commented on Jul 2, 2018

    @bpasero
    Contributor

    /cc Christof Marti (@chrmarti) who I believe is working on new API to do this

  17. chrmarti commented on Jul 9, 2018

    @chrmarti
    Collaborator

    The new API allows for listening for value changes on the input field and dynamically update the list of items in a "QuickPick": #53327 with an example: https://github.com/Microsoft/vscode-extension-samples/blob/master/quickinput-sample/src/quickOpen.ts

  18. locked and limited conversation to collaborators on Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

VIMapifeature-requestquick-pick

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions