Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
95f4f8d0
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95f4f8d0
编写于
3月 13, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow custom keypresses to NormalizedKeybindingItem
上级
6d295709
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
64 addition
and
49 deletion
+64
-49
src/vs/platform/keybinding/common/abstractKeybindingService.ts
...s/platform/keybinding/common/abstractKeybindingService.ts
+5
-5
src/vs/platform/keybinding/common/keybindingIO.ts
src/vs/platform/keybinding/common/keybindingIO.ts
+1
-1
src/vs/platform/keybinding/common/keybindingLabels.ts
src/vs/platform/keybinding/common/keybindingLabels.ts
+6
-6
src/vs/platform/keybinding/common/normalizedKeybindingItem.ts
...vs/platform/keybinding/common/normalizedKeybindingItem.ts
+14
-11
src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts
.../keybinding/test/common/abstractKeybindingService.test.ts
+8
-2
src/vs/platform/keybinding/test/common/keybindingResolver.test.ts
...latform/keybinding/test/common/keybindingResolver.test.ts
+22
-16
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
...services/keybinding/electron-browser/keybindingService.ts
+3
-3
src/vs/workbench/services/keybinding/electron-browser/nativeKeymap.ts
...ench/services/keybinding/electron-browser/nativeKeymap.ts
+5
-5
未找到文件。
src/vs/platform/keybinding/common/abstractKeybindingService.ts
浏览文件 @
95f4f8d0
...
...
@@ -23,7 +23,7 @@ import { NormalizedKeybindingItem } from 'vs/platform/keybinding/common/normaliz
import
{
OS
,
OperatingSystem
}
from
'
vs/base/common/platform
'
;
/**
* Do not instantiate. Use KeybindingService to get a ResolvedKeybinding.
* Do not instantiate. Use KeybindingService to get a ResolvedKeybinding
seeded with information about the current kb layout
.
*/
export
class
USLayoutResolvedKeybinding
extends
ResolvedKeybinding
{
...
...
@@ -57,17 +57,17 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding {
}
public
getLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getAriaLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToAriaLabel
,
this
.
_os
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToAriaLabel
,
this
.
_os
);
return
AriaLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getHTMLLabel
():
IHTMLContentElement
[]
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toHTMLLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
...
...
@@ -98,7 +98,7 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding {
return
null
;
}
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToElectronAccelerator
,
this
.
_os
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToElectronAccelerator
,
this
.
_os
);
return
ElectronAcceleratorLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
...
...
src/vs/platform/keybinding/common/keybindingIO.ts
浏览文件 @
95f4f8d0
...
...
@@ -86,7 +86,7 @@ export class KeybindingIO {
}
public
static
writeKeybinding
(
keybinding
:
Keybinding
,
OS
:
OperatingSystem
):
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
keybinding
,
this
.
_keyCodeToStr
,
OS
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
keybinding
,
this
.
_keyCodeToStr
,
OS
);
let
result
=
UserSettingsLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
OS
);
return
result
.
toLowerCase
();
...
...
src/vs/platform/keybinding/common/keybindingLabels.ts
浏览文件 @
95f4f8d0
...
...
@@ -10,13 +10,13 @@ import { OperatingSystem } from 'vs/base/common/platform';
import
{
IHTMLContentElement
}
from
'
vs/base/common/htmlContent
'
;
import
{
Keybinding
,
SimpleKeybinding
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
export
interface
IKeyCodeLabelProvider
2
{
export
interface
IKeyCodeLabelProvider
{
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
;
}
export
class
PrintableKeypress
{
public
static
fromSimpleKeybinding
2
(
keybinding
:
SimpleKeybinding
,
labelProvider
:
IKeyCodeLabelProvider2
,
OS
:
OperatingSystem
):
PrintableKeypress
{
public
static
fromSimpleKeybinding
(
keybinding
:
SimpleKeybinding
,
labelProvider
:
IKeyCodeLabelProvider
,
OS
:
OperatingSystem
):
PrintableKeypress
{
const
ctrlCmd
=
keybinding
.
hasCtrlCmd
();
const
winCtrl
=
keybinding
.
hasWinCtrl
();
...
...
@@ -31,13 +31,13 @@ export class PrintableKeypress {
return
new
PrintableKeypress
(
ctrlKey
,
shiftKey
,
altKey
,
metaKey
,
keyLabel
);
}
public
static
fromKeybinding
2
(
keybinding
:
Keybinding
,
labelProvider
:
IKeyCodeLabelProvider2
,
OS
:
OperatingSystem
):
[
PrintableKeypress
,
PrintableKeypress
]
{
public
static
fromKeybinding
(
keybinding
:
Keybinding
,
labelProvider
:
IKeyCodeLabelProvider
,
OS
:
OperatingSystem
):
[
PrintableKeypress
,
PrintableKeypress
]
{
if
(
keybinding
.
isChord
())
{
const
firstPart
=
PrintableKeypress
.
fromSimpleKeybinding
2
(
keybinding
.
extractFirstPart
(),
labelProvider
,
OS
);
const
chordPart
=
PrintableKeypress
.
fromSimpleKeybinding
2
(
keybinding
.
extractChordPart
(),
labelProvider
,
OS
);
const
firstPart
=
PrintableKeypress
.
fromSimpleKeybinding
(
keybinding
.
extractFirstPart
(),
labelProvider
,
OS
);
const
chordPart
=
PrintableKeypress
.
fromSimpleKeybinding
(
keybinding
.
extractChordPart
(),
labelProvider
,
OS
);
return
[
firstPart
,
chordPart
];
}
else
{
const
printableKeypress
=
PrintableKeypress
.
fromSimpleKeybinding
2
(
keybinding
,
labelProvider
,
OS
);
const
printableKeypress
=
PrintableKeypress
.
fromSimpleKeybinding
(
keybinding
,
labelProvider
,
OS
);
return
[
printableKeypress
,
null
];
}
}
...
...
src/vs/platform/keybinding/common/normalizedKeybindingItem.ts
浏览文件 @
95f4f8d0
...
...
@@ -30,23 +30,26 @@ export class NormalizedKeybindingItem {
if
(
source
.
keybinding
!==
0
)
{
keybinding
=
createKeybinding
(
source
.
keybinding
);
}
return
new
NormalizedKeybindingItem
(
keybinding
,
source
.
command
,
source
.
commandArgs
,
when
,
isDefault
);
}
constructor
(
keybinding
:
Keybinding
,
command
:
string
,
commandArgs
:
any
,
when
:
ContextKeyExpr
,
isDefault
:
boolean
)
{
this
.
keybinding
=
keybinding
;
let
keypressFirstPart
:
string
;
let
keypressChordPart
:
string
;
if
(
keybinding
===
null
)
{
this
.
keypressFirstPart
=
null
;
this
.
keypressChordPart
=
null
;
keypressFirstPart
=
null
;
keypressChordPart
=
null
;
}
else
if
(
keybinding
.
isChord
())
{
this
.
keypressFirstPart
=
keybinding
.
extractFirstPart
().
value
.
toString
();
this
.
keypressChordPart
=
keybinding
.
extractChordPart
().
value
.
toString
();
keypressFirstPart
=
keybinding
.
extractFirstPart
().
value
.
toString
();
keypressChordPart
=
keybinding
.
extractChordPart
().
value
.
toString
();
}
else
{
this
.
keypressFirstPart
=
keybinding
.
value
.
toString
();
this
.
keypressChordPart
=
null
;
keypressFirstPart
=
keybinding
.
value
.
toString
();
keypressChordPart
=
null
;
}
return
new
NormalizedKeybindingItem
(
keybinding
,
keypressFirstPart
,
keypressChordPart
,
source
.
command
,
source
.
commandArgs
,
when
,
isDefault
);
}
constructor
(
keybinding
:
Keybinding
,
keypressFirstPart
:
string
,
keypressChordPart
:
string
,
command
:
string
,
commandArgs
:
any
,
when
:
ContextKeyExpr
,
isDefault
:
boolean
)
{
this
.
keybinding
=
keybinding
;
this
.
keypressFirstPart
=
keypressFirstPart
;
this
.
keypressChordPart
=
keypressChordPart
;
this
.
bubble
=
(
command
?
command
.
charCodeAt
(
0
)
===
CharCode
.
Caret
:
false
);
this
.
command
=
this
.
bubble
?
command
.
substr
(
1
)
:
command
;
this
.
commandArgs
=
commandArgs
;
...
...
src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts
浏览文件 @
95f4f8d0
...
...
@@ -129,8 +129,14 @@ suite('AbstractKeybindingService', () => {
});
function
kbItem
(
keybinding
:
number
,
command
:
string
,
when
:
ContextKeyExpr
=
null
):
NormalizedKeybindingItem
{
let
kb
=
(
keybinding
!==
0
?
createKeybinding
(
keybinding
)
:
null
);
return
new
NormalizedKeybindingItem
(
kb
,
command
,
null
,
when
,
true
);
return
NormalizedKeybindingItem
.
fromKeybindingItem
({
keybinding
:
keybinding
,
command
:
command
,
commandArgs
:
null
,
when
:
when
,
weight1
:
0
,
weight2
:
0
},
true
);
}
function
toUsLabel
(
keybinding
:
number
):
string
{
...
...
src/vs/platform/keybinding/test/common/keybindingResolver.test.ts
浏览文件 @
95f4f8d0
...
...
@@ -13,8 +13,14 @@ import { NormalizedKeybindingItem } from 'vs/platform/keybinding/common/normaliz
suite
(
'
KeybindingResolver
'
,
()
=>
{
function
kbItem
(
keybinding
:
number
,
command
:
string
,
commandArgs
:
any
,
when
:
ContextKeyExpr
,
isDefault
:
boolean
):
NormalizedKeybindingItem
{
let
kb
=
(
keybinding
!==
0
?
createKeybinding
(
keybinding
)
:
null
);
return
new
NormalizedKeybindingItem
(
kb
,
command
,
commandArgs
,
when
,
isDefault
);
return
NormalizedKeybindingItem
.
fromKeybindingItem
({
keybinding
:
keybinding
,
command
:
command
,
commandArgs
:
commandArgs
,
when
:
when
,
weight1
:
0
,
weight2
:
0
},
isDefault
);
}
test
(
'
resolve key
'
,
function
()
{
...
...
@@ -49,8 +55,8 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_A
)
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
false
),
kbItem
(
KeyCode
.
KEY_A
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
false
),
]);
});
...
...
@@ -64,9 +70,9 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_A
)
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
),
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_C
)
,
'
yes3
'
,
null
,
ContextKeyExpr
.
equals
(
'
3
'
,
'
c
'
),
false
),
kbItem
(
KeyCode
.
KEY_A
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
),
kbItem
(
KeyCode
.
KEY_C
,
'
yes3
'
,
null
,
ContextKeyExpr
.
equals
(
'
3
'
,
'
c
'
),
false
),
]);
});
...
...
@@ -80,8 +86,8 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_A
)
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_A
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -95,8 +101,8 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_A
)
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_A
,
'
yes1
'
,
null
,
ContextKeyExpr
.
equals
(
'
1
'
,
'
a
'
),
true
),
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -110,7 +116,7 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -124,7 +130,7 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -138,7 +144,7 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -152,7 +158,7 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
@@ -166,7 +172,7 @@ suite('KeybindingResolver', () => {
];
let
actual
=
KeybindingResolver
.
combine
(
defaults
,
overrides
);
assert
.
deepEqual
(
actual
,
[
new
NormalizedKeybindingItem
(
createKeybinding
(
KeyCode
.
KEY_B
)
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
kbItem
(
KeyCode
.
KEY_B
,
'
yes2
'
,
null
,
ContextKeyExpr
.
equals
(
'
2
'
,
'
b
'
),
true
)
]);
});
...
...
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
浏览文件 @
95f4f8d0
...
...
@@ -130,21 +130,21 @@ export class FancyResolvedKeybinding extends ResolvedKeybinding {
public
getLabel
():
string
{
const
keyCodeLabelProvider
=
getNativeUIKeyCodeLabelProvider
();
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
return
UILabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
OS
);
}
public
getAriaLabel
():
string
{
const
keyCodeLabelProvider
=
getNativeAriaKeyCodeLabelProvider
();
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
return
AriaLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
OS
);
}
public
getHTMLLabel
():
IHTMLContentElement
[]
{
const
keyCodeLabelProvider
=
getNativeUIKeyCodeLabelProvider
();
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
2
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
keyCodeLabelProvider
,
OS
);
return
UILabelProvider
.
toHTMLLabel2
(
firstPart
,
chordPart
,
OS
);
}
...
...
src/vs/workbench/services/keybinding/electron-browser/nativeKeymap.ts
浏览文件 @
95f4f8d0
...
...
@@ -7,7 +7,7 @@
import
*
as
nativeKeymap
from
'
native-keymap
'
;
import
{
KeyCode
,
KeyCodeUtils
}
from
'
vs/base/common/keyCodes
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
IKeyCodeLabelProvider
2
}
from
'
vs/platform/keybinding/common/keybindingLabels
'
;
import
{
IKeyCodeLabelProvider
}
from
'
vs/platform/keybinding/common/keybindingLabels
'
;
import
{
lookupKeyCode
,
setExtractKeyCode
}
from
'
vs/base/browser/keyboardEvent
'
;
import
Platform
=
require
(
'
vs/base/common/platform
'
);
...
...
@@ -332,8 +332,8 @@ setExtractKeyCode((e: KeyboardEvent) => {
return
lookupKeyCode
(
e
);
});
let
nativeUIKeyCodeLabelProvider
:
IKeyCodeLabelProvider
2
=
null
;
export
function
getNativeUIKeyCodeLabelProvider
():
IKeyCodeLabelProvider
2
{
let
nativeUIKeyCodeLabelProvider
:
IKeyCodeLabelProvider
=
null
;
export
function
getNativeUIKeyCodeLabelProvider
():
IKeyCodeLabelProvider
{
if
(
!
nativeUIKeyCodeLabelProvider
)
{
let
remaps
=
getNativeLabelProviderRemaps
();
nativeUIKeyCodeLabelProvider
=
(
keyCode
:
KeyCode
,
OS
:
Platform
.
OperatingSystem
):
string
=>
{
...
...
@@ -360,8 +360,8 @@ export function getNativeUIKeyCodeLabelProvider(): IKeyCodeLabelProvider2 {
return
nativeUIKeyCodeLabelProvider
;
}
let
nativeAriaKeyCodeLabelProvider
:
IKeyCodeLabelProvider
2
=
null
;
export
function
getNativeAriaKeyCodeLabelProvider
():
IKeyCodeLabelProvider
2
{
let
nativeAriaKeyCodeLabelProvider
:
IKeyCodeLabelProvider
=
null
;
export
function
getNativeAriaKeyCodeLabelProvider
():
IKeyCodeLabelProvider
{
if
(
!
nativeAriaKeyCodeLabelProvider
)
{
let
remaps
=
getNativeLabelProviderRemaps
();
nativeAriaKeyCodeLabelProvider
=
(
keyCode
:
KeyCode
,
OS
:
Platform
.
OperatingSystem
):
string
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录