Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
515132f6
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,发现更多精彩内容 >>
未验证
提交
515132f6
编写于
7月 30, 2018
作者:
D
Daniel Imms
提交者:
GitHub
7月 30, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #55061 from Microsoft/tyriar/53002_linux_super
Label Windows key as super on Linux
上级
0e391952
aa6dd3f1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
9 deletion
+23
-9
src/vs/base/common/keybindingLabels.ts
src/vs/base/common/keybindingLabels.ts
+14
-0
src/vs/platform/keybinding/test/common/keybindingLabels.test.ts
.../platform/keybinding/test/common/keybindingLabels.test.ts
+9
-9
未找到文件。
src/vs/base/common/keybindingLabels.ts
浏览文件 @
515132f6
...
...
@@ -59,6 +59,13 @@ export const UILabelProvider = new ModifierLabelProvider(
altKey
:
nls
.
localize
({
key
:
'
altKey
'
,
comment
:
[
'
This is the short form for the Alt key on the keyboard
'
]
},
"
Alt
"
),
metaKey
:
nls
.
localize
({
key
:
'
windowsKey
'
,
comment
:
[
'
This is the short form for the Windows key on the keyboard
'
]
},
"
Windows
"
),
separator
:
'
+
'
,
},
{
ctrlKey
:
nls
.
localize
({
key
:
'
ctrlKey
'
,
comment
:
[
'
This is the short form for the Control key on the keyboard
'
]
},
"
Ctrl
"
),
shiftKey
:
nls
.
localize
({
key
:
'
shiftKey
'
,
comment
:
[
'
This is the short form for the Shift key on the keyboard
'
]
},
"
Shift
"
),
altKey
:
nls
.
localize
({
key
:
'
altKey
'
,
comment
:
[
'
This is the short form for the Alt key on the keyboard
'
]
},
"
Alt
"
),
metaKey
:
nls
.
localize
({
key
:
'
superKey
'
,
comment
:
[
'
This is the short form for the Super key on the keyboard
'
]
},
"
Super
"
),
separator
:
'
+
'
,
}
);
...
...
@@ -79,6 +86,13 @@ export const AriaLabelProvider = new ModifierLabelProvider(
altKey
:
nls
.
localize
({
key
:
'
altKey.long
'
,
comment
:
[
'
This is the long form for the Alt key on the keyboard
'
]
},
"
Alt
"
),
metaKey
:
nls
.
localize
({
key
:
'
windowsKey.long
'
,
comment
:
[
'
This is the long form for the Windows key on the keyboard
'
]
},
"
Windows
"
),
separator
:
'
+
'
,
},
{
ctrlKey
:
nls
.
localize
({
key
:
'
ctrlKey.long
'
,
comment
:
[
'
This is the long form for the Control key on the keyboard
'
]
},
"
Control
"
),
shiftKey
:
nls
.
localize
({
key
:
'
shiftKey.long
'
,
comment
:
[
'
This is the long form for the Shift key on the keyboard
'
]
},
"
Shift
"
),
altKey
:
nls
.
localize
({
key
:
'
altKey.long
'
,
comment
:
[
'
This is the long form for the Alt key on the keyboard
'
]
},
"
Alt
"
),
metaKey
:
nls
.
localize
({
key
:
'
superKey.long
'
,
comment
:
[
'
This is the long form for the Super key on the keyboard
'
]
},
"
Super
"
),
separator
:
'
+
'
,
}
);
...
...
src/vs/platform/keybinding/test/common/keybindingLabels.test.ts
浏览文件 @
515132f6
...
...
@@ -55,24 +55,24 @@ suite('KeybindingLabels', () => {
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_A
,
'
Ctrl+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyCode
.
KEY_A
,
'
Shift+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Alt
|
KeyCode
.
KEY_A
,
'
Alt+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Super
+A
'
);
// two modifiers
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
KEY_A
,
'
Ctrl+Alt+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+
Super
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
KEY_A
,
'
Shift+Alt+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Shift+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Alt+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Shift+
Super
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Alt+
Super
+A
'
);
// three modifiers
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+Alt+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Alt+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Shift+Alt+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+
Super
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Alt+
Super
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Shift+Alt+
Super
+A
'
);
// four modifiers
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+Alt+
Windows
+A
'
);
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Ctrl+Shift+Alt+
Super
+A
'
);
// chord
assertUSLabel
(
OperatingSystem
.
Linux
,
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_A
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_B
),
'
Ctrl+A Ctrl+B
'
);
...
...
@@ -122,7 +122,7 @@ suite('KeybindingLabels', () => {
}
assertAriaLabel
(
OperatingSystem
.
Windows
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Control+Shift+Alt+Windows+A
'
);
assertAriaLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Control+Shift+Alt+
Windows
+A
'
);
assertAriaLabel
(
OperatingSystem
.
Linux
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Control+Shift+Alt+
Super
+A
'
);
assertAriaLabel
(
OperatingSystem
.
Macintosh
,
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
,
'
Control+Shift+Alt+Command+A
'
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录