Remove CommonKeybindings

This commit is contained in:
Alexandru Dima
2016-09-13 16:42:42 +02:00
parent a6b89e14f8
commit 55bf5acb2e
23 changed files with 119 additions and 165 deletions

View File

@@ -17,7 +17,7 @@ import Event, {Emitter} from 'vs/base/common/event';
import {Action} from 'vs/base/common/actions';
import htmlRenderer = require('vs/base/browser/htmlContentRenderer');
import {StandardKeyboardEvent} from 'vs/base/browser/keyboardEvent';
import {CommonKeybindings} from 'vs/base/common/keyCodes';
import {KeyCode} from 'vs/base/common/keyCodes';
export enum Severity {
Info,
@@ -212,7 +212,7 @@ export class MessageList {
div.a({ class: 'action-button', tabindex: '0', role: 'button' }).text(action.label).on([DOM.EventType.CLICK, DOM.EventType.KEY_DOWN], (e) => {
if (e instanceof KeyboardEvent) {
const event = new StandardKeyboardEvent(e);
if (!event.equals(CommonKeybindings.ENTER) && !event.equals(CommonKeybindings.SPACE)) {
if (!event.equals(KeyCode.Enter) && !event.equals(KeyCode.Space)) {
return; // Only handle Enter/Escape for keyboard access
}
}