提交 f90a0abe 编写于 作者: P Peng Lyu

Use interfaces for keyboard layout registration

上级 7583fe8a
......@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
import { IKeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
export class KeyboardLayoutContribution {
public static readonly INSTANCE: KeyboardLayoutContribution = new KeyboardLayoutContribution();
private _layoutInfos: KeymapInfo[] = [];
private _layoutInfos: IKeymapInfo[] = [];
get layoutInfos() {
return this._layoutInfos;
......@@ -17,7 +17,7 @@ export class KeyboardLayoutContribution {
private constructor() {
}
registerKeyboardLayout(layout: KeymapInfo) {
registerKeyboardLayout(layout: IKeymapInfo) {
this._layoutInfos.push(layout);
}
}
\ No newline at end of file
......@@ -4,12 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000405', id: '', text: 'Czech' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000405', id: '', text: 'Czech' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +165,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000807', id: '', text: 'Swiss German' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000807', id: '', text: 'Swiss German' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.German', lang: 'de', localizedName: 'German' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.German', lang: 'de', localizedName: 'German' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', '', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ model: 'pc104', layout: 'de', variant: '', options: '', rules: 'base' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { model: 'pc104', layout: 'de', variant: '', options: '', rules: 'base' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'æ', 'Æ', 0],
......@@ -184,4 +184,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
MailForward: [],
MailSend: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000407', id: '', text: 'German' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000407', id: '', text: 'German' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000406', id: '', text: 'Danish' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000406', id: '', text: 'Danish' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -167,4 +167,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000813', id: '', text: 'Belgian (Period)' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000813', id: '', text: 'Belgian (Period)' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['q', 'Q', '', '', 0, 'VK_Q'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.USExtended', lang: 'en', localizedName: 'ABC - Extended' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.USExtended', lang: 'en', localizedName: 'ABC - Extended' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', '¯', '̄', 4],
KeyB: ['b', 'B', '˘', '̆', 4],
KeyC: ['c', 'C', '¸', '̧', 4],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00004009', id: '', text: 'India' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00004009', id: '', text: 'India' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'ā', 'Ā', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.USInternational-PC', lang: 'en', localizedName: 'U.S. International - PC' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.USInternational-PC', lang: 'en', localizedName: 'U.S. International - PC' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00020409', id: '0001', text: 'United States-International' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00020409', id: '0001', text: 'United States-International' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'á', 'Á', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,13 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.British', lang: 'en', localizedName: 'British' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.British', lang: 'en', localizedName: 'British' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -130,4 +128,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000809', id: '', text: 'United Kingdom' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000809', id: '', text: 'United Kingdom' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'á', 'Á', 0, 'VK_A'],
......@@ -167,4 +167,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.US', lang: 'en', localizedName: 'U.S.', isUSStandard: true },
[
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.US', lang: 'en', localizedName: 'U.S.', isUSStandard: true },
secondaryLayouts: [
{ id: 'com.apple.keylayout.ABC', lang: 'en', localizedName: 'ABC' },
{ id: 'com.sogou.inputmethod.sogou.pinyin', lang: 'zh-Hans', localizedName: 'Pinyin - Simplified' },
{ id: 'com.apple.inputmethod.Kotoeri.Roman', lang: 'en', localizedName: 'Romaji' },
......@@ -17,7 +17,7 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Canadian', lang: 'en', localizedName: 'Canadian English' },
{ id: 'com.apple.keylayout.Brazilian', lang: 'pt', localizedName: 'Brazilian' },
],
{
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -137,4 +137,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,14 +4,14 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ model: 'pc105', layout: 'us', variant: '', options: '', rules: 'evdev', isUSStandard: true },
[
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { model: 'pc105', layout: 'us', variant: '', options: '', rules: 'evdev', isUSStandard: true },
secondaryLayouts: [
{ model: 'pc105', layout: 'cn', variant: '', options: '', rules: 'evdev' },
],
{
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'a', 'A', 0],
......@@ -187,4 +187,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
MailSend: []
}
));
});
......@@ -4,17 +4,17 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000409', id: '', text: 'US', isUSStandard: true },
[
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000409', id: '', text: 'US', isUSStandard: true },
secondaryLayouts: [
{ name: '00000804', id: '', text: 'Chinese (Simplified) - US Keyboard' },
{ name: '00000411', id: '', text: 'Japanese' },
{ name: '00000412', id: '', text: 'Korean' },
{ name: '00000404', id: '', text: 'Chinese (Traditional) - US Keyboard' }
],
{
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -171,4 +171,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000080A', id: '', text: 'Latin American' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000080A', id: '', text: 'Latin American' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -167,4 +167,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Spanish-ISO', lang: 'es', localizedName: 'Spanish - ISO' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.Spanish-ISO', lang: 'es', localizedName: 'Spanish - ISO' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', 'ß', '', 0],
KeyC: ['c', 'C', '©', ' ', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ model: 'pc105', layout: 'es', variant: '', options: '', rules: 'evdev' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { model: 'pc105', layout: 'es', variant: '', options: '', rules: 'evdev' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'æ', 'Æ', 0],
......@@ -184,4 +184,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
MailForward: [],
MailSend: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000040A', id: '', text: 'Spanish' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000040A', id: '', text: 'Spanish' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.French', lang: 'fr', localizedName: 'French' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.French', lang: 'fr', localizedName: 'French' },
secondaryLayouts: [],
mapping: {
KeyA: ['q', 'Q', '', 'Ω', 0],
KeyB: ['b', 'B', 'ß', '', 0],
KeyC: ['c', 'C', '©', '¢', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ model: 'pc104', layout: 'fr', variant: '', options: '', rules: 'base' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { model: 'pc104', layout: 'fr', variant: '', options: '', rules: 'base' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['q', 'Q', '@', 'Ω', 0],
......@@ -184,4 +184,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
MailForward: [],
MailSend: []
}
));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000040C', id: '', text: 'French' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000040C', id: '', text: 'French' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['q', 'Q', '', '', 0, 'VK_Q'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000040E', id: '', text: 'Hungarian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000040E', id: '', text: 'Hungarian' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'ä', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Italian-Pro', lang: 'it', localizedName: 'Italian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.Italian-Pro', lang: 'it', localizedName: 'Italian' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'Í', 0],
KeyC: ['c', 'C', '©', 'Á', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000410', id: '', text: 'Italian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000410', id: '', text: 'Italian' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.google.inputmethod.Japanese.Roman', lang: 'en', localizedName: 'Alphanumeric (Google)' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.google.inputmethod.Japanese.Roman', lang: 'en', localizedName: 'Alphanumeric (Google)' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', '¯', '̄', 4],
KeyB: ['b', 'B', '˘', '̆', 4],
KeyC: ['c', 'C', '¸', '̧', 4],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.inputmethod.Kotoeri.Japanese', lang: 'ja', localizedName: 'Hiragana' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.inputmethod.Kotoeri.Japanese', lang: 'ja', localizedName: 'Hiragana' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,13 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.inputmethod.Korean.2SetKorean', lang: 'ko', localizedName: '2-Set Korean' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.inputmethod.Korean.2SetKorean', lang: 'ko', localizedName: '2-Set Korean' },
secondaryLayouts: [],
mapping: {
KeyA: ['', '', 'a', 'A', 0],
KeyB: ['', '', 'b', 'B', 0],
KeyC: ['', '', 'c', 'C', 0],
......@@ -130,5 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000414', id: '', text: 'Norwegian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000414', id: '', text: 'Norwegian' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.PolishPro', lang: 'pl', localizedName: 'Polish - Pro' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.PolishPro', lang: 'pl', localizedName: 'Polish - Pro' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'ą', 'Ą', 0],
KeyB: ['b', 'B', 'ļ', 'ű', 0],
KeyC: ['c', 'C', 'ć', 'Ć', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000415', id: '', text: 'Polish (Programmers)' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000415', id: '', text: 'Polish (Programmers)' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'ą', 'Ą', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000416', id: '', text: 'Portuguese (Brazilian ABNT)' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000416', id: '', text: 'Portuguese (Brazilian ABNT)' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -167,4 +167,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Brazilian-Pro', lang: 'pt' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.Brazilian-Pro', lang: 'pt' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000816', id: '', text: 'Portuguese' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000816', id: '', text: 'Portuguese' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -167,4 +167,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Russian', lang: 'ru', localizedName: 'Russian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.Russian', lang: 'ru', localizedName: 'Russian' },
secondaryLayouts: [],
mapping: {
KeyA: ['ф', 'Ф', 'ƒ', 'ƒ', 0],
KeyB: ['и', 'И', 'и', 'И', 0],
KeyC: ['с', 'С', '', '', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ model: 'pc104', layout: 'ru', variant: ',', options: '', rules: 'base' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { model: 'pc104', layout: 'ru', variant: ',', options: '', rules: 'base' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['ф', 'Ф', 'ф', 'Ф', 0],
......@@ -184,5 +184,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
MailForward: [],
MailSend: []
}
));
});
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '00000419', id: '', text: 'Russian' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '00000419', id: '', text: 'Russian' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['ф', 'Ф', '', '', 0, 'VK_A'],
......@@ -166,4 +166,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.keylayout.Swedish-Pro', lang: 'sv', localizedName: 'Swedish - Pro' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.keylayout.Swedish-Pro', lang: 'sv', localizedName: 'Swedish - Pro' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', '', '', 0],
KeyB: ['b', 'B', '', '»', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,4 +129,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,14 +4,14 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000041D', id: '', text: 'Swedish' },
[
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000041D', id: '', text: 'Swedish' },
secondaryLayouts: [
{ name: '0000040B', id: '', text: 'Finnish' }
],
{
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', '', '', 0, 'VK_A'],
......@@ -168,5 +168,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000041E', id: '', text: 'Thai Kedmanee' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000041E', id: '', text: 'Thai Kedmanee' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['', '', '', '', 0, 'VK_A'],
......@@ -166,4 +165,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
});
......@@ -4,12 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
{ name: '0000041F', id: '', text: 'Turkish Q' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { name: '0000041F', id: '', text: 'Turkish Q' },
secondaryLayouts: [],
mapping: {
Sleep: [],
WakeUp: [],
KeyA: ['a', 'A', 'æ', 'Æ', 0, 'VK_A'],
......@@ -166,4 +165,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout((new KeymapInfo(
BrowserRefresh: [],
BrowserFavorites: []
}
)));
\ No newline at end of file
});
\ No newline at end of file
......@@ -4,12 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution';
import { KeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
{ id: 'com.apple.inputmethod.SCIM.ITABC', lang: 'zh-Hans', localizedName: '搜狗拼音' },
[],
{
KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({
layout: { id: 'com.apple.inputmethod.SCIM.ITABC', lang: 'zh-Hans', localizedName: '搜狗拼音' },
secondaryLayouts: [],
mapping: {
KeyA: ['a', 'A', 'å', 'Å', 0],
KeyB: ['b', 'B', '', 'ı', 0],
KeyC: ['c', 'C', 'ç', 'Ç', 0],
......@@ -129,5 +128,4 @@ KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout(new KeymapInfo(
AltRight: [],
MetaRight: []
}
));
\ No newline at end of file
});
\ No newline at end of file
......@@ -6,7 +6,7 @@
import * as nls from 'vs/nls';
import { Emitter, Event } from 'vs/base/common/event';
import { Disposable, toDisposable, IDisposable, MutableDisposable } from 'vs/base/common/lifecycle';
import { IKeymapService, IKeyboardLayoutInfo, IKeyboardMapping, IWindowsKeyboardMapping, KeymapInfo, IRawMixedKeyboardMapping, getKeyboardLayoutId } from 'vs/workbench/services/keybinding/common/keymapInfo';
import { IKeymapService, IKeyboardLayoutInfo, IKeyboardMapping, IWindowsKeyboardMapping, KeymapInfo, IRawMixedKeyboardMapping, getKeyboardLayoutId, IKeymapInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { DispatchConfig } from 'vs/workbench/services/keybinding/common/dispatchConfig';
import { IKeyboardMapper, CachedKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper';
......@@ -79,7 +79,8 @@ export class BrowserKeyboardMapperFactory {
const platform = isWindows ? 'win' : isMacintosh ? 'darwin' : 'linux';
import('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.' + platform).then((m) => {
this._keymapInfos.push(...m.KeyboardLayoutContribution.INSTANCE.layoutInfos);
let keymapInfos: IKeymapInfo[] = m.KeyboardLayoutContribution.INSTANCE.layoutInfos;
this._keymapInfos.push(...keymapInfos.map(info => (new KeymapInfo(info.layout, info.secondaryLayouts, info.mapping, info.isUserKeyboardLayout))));
this._mru = this._keymapInfos;
this._initialized = true;
this.onKeyboardLayoutChanged();
......
......@@ -248,6 +248,13 @@ interface ISerializedMapping {
[key: string]: (string | number)[];
}
export interface IKeymapInfo {
layout: IKeyboardLayoutInfo;
secondaryLayouts: IKeyboardLayoutInfo[];
mapping: ISerializedMapping;
isUserKeyboardLayout?: boolean;
}
export class KeymapInfo {
mapping: IRawMixedKeyboardMapping;
isUserKeyboardLayout: boolean;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册