Skip to content

How to detect shift shift key in VSCode? #5280

Closed
@kasecato

Description

@kasecato
  • VSCode Version: 1.0.0
  • OS Version: OS X El Capitan 10.11.4

Steps to Reproduce:

I'm trying to bind quick open (ctrl+p) command to shift shift (shift x2) keys like IntelliJ IDEA in VS Code Extension (TypeScript).

But vscode.commands.registerCommand('type', (args) => args.text) can't detect shfit key.

How can I detect shift shift key?

// VSCode v0.10.12 or higher (not working <= v0.10.11)
'use strict';
import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {

    let disposable = vscode.commands.registerCommand('type', (args) => {

        vscode.window.showInformationMessage(args.text);

        vscode.commands.executeCommand('default:type', {
            text: args.text
        });
    });

    context.subscriptions.push(disposable);
}

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsiderskeybindingsVS Code keybinding issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions