Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e968d3ce
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,发现更多精彩内容 >>
提交
e968d3ce
编写于
5月 11, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #23685: Add support for ABNT_C1 and ABNT_C2 key codes
上级
4c94c83e
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
1480 addition
and
4 deletion
+1480
-4
src/vs/base/browser/keyboardEvent.ts
src/vs/base/browser/keyboardEvent.ts
+2
-0
src/vs/base/common/keyCodes.ts
src/vs/base/common/keyCodes.ts
+7
-0
src/vs/editor/common/standalone/standaloneBase.ts
src/vs/editor/common/standalone/standaloneBase.ts
+5
-0
src/vs/editor/test/common/standalone/standaloneBase.test.ts
src/vs/editor/test/common/standalone/standaloneBase.test.ts
+2
-0
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+3
-1
src/vs/platform/keybinding/common/keybindingsRegistry.ts
src/vs/platform/keybinding/common/keybindingsRegistry.ts
+2
-0
src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts
...bench/services/keybinding/common/windowsKeyboardMapper.ts
+15
-3
src/vs/workbench/services/keybinding/test/keybindingIO.test.ts
...s/workbench/services/keybinding/test/keybindingIO.test.ts
+4
-0
src/vs/workbench/services/keybinding/test/win_por_ptb.js
src/vs/workbench/services/keybinding/test/win_por_ptb.js
+1093
-0
src/vs/workbench/services/keybinding/test/win_por_ptb.txt
src/vs/workbench/services/keybinding/test/win_por_ptb.txt
+284
-0
src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts
...ch/services/keybinding/test/windowsKeyboardMapper.test.ts
+63
-0
未找到文件。
src/vs/base/browser/keyboardEvent.ts
浏览文件 @
e968d3ce
...
...
@@ -120,6 +120,8 @@ let KEY_CODE_MAP: { [keyCode: number]: KeyCode } = {};
KEY_CODE_MAP
[
190
]
=
KeyCode
.
US_DOT
;
KEY_CODE_MAP
[
191
]
=
KeyCode
.
US_SLASH
;
KEY_CODE_MAP
[
192
]
=
KeyCode
.
US_BACKTICK
;
KEY_CODE_MAP
[
193
]
=
KeyCode
.
ABNT_C1
;
KEY_CODE_MAP
[
194
]
=
KeyCode
.
ABNT_C2
;
KEY_CODE_MAP
[
219
]
=
KeyCode
.
US_OPEN_SQUARE_BRACKET
;
KEY_CODE_MAP
[
220
]
=
KeyCode
.
US_BACKSLASH
;
KEY_CODE_MAP
[
221
]
=
KeyCode
.
US_CLOSE_SQUARE_BRACKET
;
...
...
src/vs/base/common/keyCodes.ts
浏览文件 @
e968d3ce
...
...
@@ -190,6 +190,9 @@ export const enum KeyCode {
*/
KEY_IN_COMPOSITION
=
109
,
ABNT_C1
=
110
,
// Brazilian (ABNT) Keyboard
ABNT_C2
=
111
,
// Brazilian (ABNT) Keyboard
/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
...
...
@@ -344,6 +347,8 @@ let STRING = createMapping((TO_STRING_MAP) => {
TO_STRING_MAP
[
KeyCode
.
US_DOT
]
=
'
.
'
;
TO_STRING_MAP
[
KeyCode
.
US_SLASH
]
=
'
/
'
;
TO_STRING_MAP
[
KeyCode
.
US_BACKTICK
]
=
'
`
'
;
TO_STRING_MAP
[
KeyCode
.
ABNT_C1
]
=
'
ABNT_C1
'
;
TO_STRING_MAP
[
KeyCode
.
ABNT_C2
]
=
'
ABNT_C2
'
;
TO_STRING_MAP
[
KeyCode
.
US_OPEN_SQUARE_BRACKET
]
=
'
[
'
;
TO_STRING_MAP
[
KeyCode
.
US_BACKSLASH
]
=
'
\\
'
;
TO_STRING_MAP
[
KeyCode
.
US_CLOSE_SQUARE_BRACKET
]
=
'
]
'
;
...
...
@@ -395,6 +400,8 @@ export let USER_SETTINGS = createMapping((TO_USER_SETTINGS_MAP) => {
FROM_USER_SETTINGS_MAP
[
'
OEM_PERIOD
'
]
=
KeyCode
.
US_DOT
;
FROM_USER_SETTINGS_MAP
[
'
OEM_2
'
]
=
KeyCode
.
US_SLASH
;
FROM_USER_SETTINGS_MAP
[
'
OEM_3
'
]
=
KeyCode
.
US_BACKTICK
;
FROM_USER_SETTINGS_MAP
[
'
ABNT_C1
'
]
=
KeyCode
.
ABNT_C1
;
FROM_USER_SETTINGS_MAP
[
'
ABNT_C2
'
]
=
KeyCode
.
ABNT_C2
;
FROM_USER_SETTINGS_MAP
[
'
OEM_4
'
]
=
KeyCode
.
US_OPEN_SQUARE_BRACKET
;
FROM_USER_SETTINGS_MAP
[
'
OEM_5
'
]
=
KeyCode
.
US_BACKSLASH
;
FROM_USER_SETTINGS_MAP
[
'
OEM_6
'
]
=
KeyCode
.
US_CLOSE_SQUARE_BRACKET
;
...
...
src/vs/editor/common/standalone/standaloneBase.ts
浏览文件 @
e968d3ce
...
...
@@ -16,6 +16,7 @@ import URI from 'vs/base/common/uri';
// --------------------------------------------
// This is repeated here so it can be exported
// because TS inlines const enums
// --------------------------------------------
export
enum
Severity
{
Ignore
=
0
,
...
...
@@ -26,6 +27,7 @@ export enum Severity {
// --------------------------------------------
// This is repeated here so it can be exported
// because TS inlines const enums
// --------------------------------------------
export
class
KeyMod
{
public
static
readonly
CtrlCmd
:
number
=
ConstKeyMod
.
CtrlCmd
;
...
...
@@ -40,6 +42,7 @@ export class KeyMod {
// --------------------------------------------
// This is repeated here so it can be exported
// because TS inlines const enums
// --------------------------------------------
/**
* Virtual Key Codes, the value does not hold any inherent meaning.
...
...
@@ -213,6 +216,8 @@ export enum KeyCode {
* Cover all key codes when IME is processing input.
*/
KEY_IN_COMPOSITION
=
109
,
ABNT_C1
=
110
,
ABNT_C2
=
111
,
/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
...
...
src/vs/editor/test/common/standalone/standaloneBase.test.ts
浏览文件 @
e968d3ce
...
...
@@ -135,6 +135,8 @@ suite('KeyCode', () => {
assertKeyCode
(
StandaloneKeyCode
.
NUMPAD_DECIMAL
,
RuntimeKeyCode
.
NUMPAD_DECIMAL
);
assertKeyCode
(
StandaloneKeyCode
.
NUMPAD_DIVIDE
,
RuntimeKeyCode
.
NUMPAD_DIVIDE
);
assertKeyCode
(
StandaloneKeyCode
.
KEY_IN_COMPOSITION
,
RuntimeKeyCode
.
KEY_IN_COMPOSITION
);
assertKeyCode
(
StandaloneKeyCode
.
ABNT_C1
,
RuntimeKeyCode
.
ABNT_C1
);
assertKeyCode
(
StandaloneKeyCode
.
ABNT_C2
,
RuntimeKeyCode
.
ABNT_C2
);
assertKeyCode
(
StandaloneKeyCode
.
MAX_VALUE
,
RuntimeKeyCode
.
MAX_VALUE
);
});
});
src/vs/monaco.d.ts
浏览文件 @
e968d3ce
...
...
@@ -357,11 +357,13 @@ declare module monaco {
* Cover all key codes when IME is processing input.
*/
KEY_IN_COMPOSITION
=
109
,
ABNT_C1
=
110
,
ABNT_C2
=
111
,
/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
*/
MAX_VALUE
=
11
0
,
MAX_VALUE
=
11
2
,
}
export
class
KeyMod
{
...
...
src/vs/platform/keybinding/common/keybindingsRegistry.ts
浏览文件 @
e968d3ce
...
...
@@ -180,6 +180,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
||
keyCode
===
KeyCode
.
US_DOT
||
keyCode
===
KeyCode
.
US_SLASH
||
keyCode
===
KeyCode
.
US_BACKTICK
||
keyCode
===
KeyCode
.
ABNT_C1
||
keyCode
===
KeyCode
.
ABNT_C2
||
keyCode
===
KeyCode
.
US_OPEN_SQUARE_BRACKET
||
keyCode
===
KeyCode
.
US_BACKSLASH
||
keyCode
===
KeyCode
.
US_CLOSE_SQUARE_BRACKET
...
...
src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts
浏览文件 @
e968d3ce
...
...
@@ -301,11 +301,21 @@ export class WindowsKeyboardMapper implements IKeyboardMapper {
log
(
`Unknown scanCode
${
strCode
}
in mapping.`
);
continue
;
}
if
(
IMMUTABLE_CODE_TO_KEY_CODE
[
scanCode
]
!==
-
1
)
{
continue
;
const
rawMapping
=
rawMappings
[
strCode
];
const
immutableKeyCode
=
IMMUTABLE_CODE_TO_KEY_CODE
[
scanCode
];
if
(
immutableKeyCode
!==
-
1
)
{
const
keyCode
=
NATIVE_KEY_CODE_TO_KEY_CODE
[
rawMapping
.
vkey
]
||
KeyCode
.
Unknown
;
if
(
keyCode
===
KeyCode
.
Unknown
||
immutableKeyCode
===
keyCode
)
{
continue
;
}
if
(
scanCode
!==
ScanCode
.
NumpadComma
)
{
// Looks like ScanCode.NumpadComma doesn't always map to KeyCode.NUMPAD_SEPARATOR
// e.g. on POR - PTB
continue
;
}
}
const
rawMapping
=
rawMappings
[
strCode
];
const
value
=
rawMapping
.
value
;
const
withShift
=
rawMapping
.
withShift
;
const
withAltGr
=
rawMapping
.
withAltGr
;
...
...
@@ -625,6 +635,8 @@ function _getNativeMap() {
VK_OEM_PERIOD
:
KeyCode
.
US_DOT
,
VK_OEM_2
:
KeyCode
.
US_SLASH
,
VK_OEM_3
:
KeyCode
.
US_BACKTICK
,
VK_ABNT_C1
:
KeyCode
.
ABNT_C1
,
VK_ABNT_C2
:
KeyCode
.
ABNT_C2
,
VK_OEM_4
:
KeyCode
.
US_OPEN_SQUARE_BRACKET
,
VK_OEM_5
:
KeyCode
.
US_BACKSLASH
,
VK_OEM_6
:
KeyCode
.
US_CLOSE_SQUARE_BRACKET
,
...
...
src/vs/workbench/services/keybinding/test/keybindingIO.test.ts
浏览文件 @
e968d3ce
...
...
@@ -84,6 +84,8 @@ suite('keybindingIO', () => {
testRoundtrip
(
KeyCode
.
US_DOT
,
'
.
'
,
'
.
'
,
'
.
'
);
testRoundtrip
(
KeyCode
.
US_SLASH
,
'
/
'
,
'
/
'
,
'
/
'
);
testRoundtrip
(
KeyCode
.
US_BACKTICK
,
'
`
'
,
'
`
'
,
'
`
'
);
testRoundtrip
(
KeyCode
.
ABNT_C1
,
'
abnt_c1
'
,
'
abnt_c1
'
,
'
abnt_c1
'
);
testRoundtrip
(
KeyCode
.
ABNT_C2
,
'
abnt_c2
'
,
'
abnt_c2
'
,
'
abnt_c2
'
);
testRoundtrip
(
KeyCode
.
US_OPEN_SQUARE_BRACKET
,
'
[
'
,
'
[
'
,
'
[
'
);
testRoundtrip
(
KeyCode
.
US_BACKSLASH
,
'
\\
'
,
'
\\
'
,
'
\\
'
);
testRoundtrip
(
KeyCode
.
US_CLOSE_SQUARE_BRACKET
,
'
]
'
,
'
]
'
,
'
]
'
);
...
...
@@ -99,6 +101,8 @@ suite('keybindingIO', () => {
testDeserialization
(
'
OEM_PERIOD
'
,
'
OEM_PERIOD
'
,
'
OEM_PERIOD
'
,
KeyCode
.
US_DOT
);
testDeserialization
(
'
OEM_2
'
,
'
OEM_2
'
,
'
OEM_2
'
,
KeyCode
.
US_SLASH
);
testDeserialization
(
'
OEM_3
'
,
'
OEM_3
'
,
'
OEM_3
'
,
KeyCode
.
US_BACKTICK
);
testDeserialization
(
'
ABNT_C1
'
,
'
ABNT_C1
'
,
'
ABNT_C1
'
,
KeyCode
.
ABNT_C1
);
testDeserialization
(
'
ABNT_C2
'
,
'
ABNT_C2
'
,
'
ABNT_C2
'
,
KeyCode
.
ABNT_C2
);
testDeserialization
(
'
OEM_4
'
,
'
OEM_4
'
,
'
OEM_4
'
,
KeyCode
.
US_OPEN_SQUARE_BRACKET
);
testDeserialization
(
'
OEM_5
'
,
'
OEM_5
'
,
'
OEM_5
'
,
KeyCode
.
US_BACKSLASH
);
testDeserialization
(
'
OEM_6
'
,
'
OEM_6
'
,
'
OEM_6
'
,
KeyCode
.
US_CLOSE_SQUARE_BRACKET
);
...
...
src/vs/workbench/services/keybinding/test/win_por_ptb.js
0 → 100644
浏览文件 @
e968d3ce
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
define
({
Sleep
:
{
vkey
:
'
VK_SLEEP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
WakeUp
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyA
:
{
vkey
:
'
VK_A
'
,
value
:
'
a
'
,
withShift
:
'
A
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyB
:
{
vkey
:
'
VK_B
'
,
value
:
'
b
'
,
withShift
:
'
B
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyC
:
{
vkey
:
'
VK_C
'
,
value
:
'
c
'
,
withShift
:
'
C
'
,
withAltGr
:
'
₢
'
,
withShiftAltGr
:
''
},
KeyD
:
{
vkey
:
'
VK_D
'
,
value
:
'
d
'
,
withShift
:
'
D
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyE
:
{
vkey
:
'
VK_E
'
,
value
:
'
e
'
,
withShift
:
'
E
'
,
withAltGr
:
'
°
'
,
withShiftAltGr
:
''
},
KeyF
:
{
vkey
:
'
VK_F
'
,
value
:
'
f
'
,
withShift
:
'
F
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyG
:
{
vkey
:
'
VK_G
'
,
value
:
'
g
'
,
withShift
:
'
G
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyH
:
{
vkey
:
'
VK_H
'
,
value
:
'
h
'
,
withShift
:
'
H
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyI
:
{
vkey
:
'
VK_I
'
,
value
:
'
i
'
,
withShift
:
'
I
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyJ
:
{
vkey
:
'
VK_J
'
,
value
:
'
j
'
,
withShift
:
'
J
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyK
:
{
vkey
:
'
VK_K
'
,
value
:
'
k
'
,
withShift
:
'
K
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyL
:
{
vkey
:
'
VK_L
'
,
value
:
'
l
'
,
withShift
:
'
L
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyM
:
{
vkey
:
'
VK_M
'
,
value
:
'
m
'
,
withShift
:
'
M
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyN
:
{
vkey
:
'
VK_N
'
,
value
:
'
n
'
,
withShift
:
'
N
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyO
:
{
vkey
:
'
VK_O
'
,
value
:
'
o
'
,
withShift
:
'
O
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyP
:
{
vkey
:
'
VK_P
'
,
value
:
'
p
'
,
withShift
:
'
P
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyQ
:
{
vkey
:
'
VK_Q
'
,
value
:
'
q
'
,
withShift
:
'
Q
'
,
withAltGr
:
'
/
'
,
withShiftAltGr
:
''
},
KeyR
:
{
vkey
:
'
VK_R
'
,
value
:
'
r
'
,
withShift
:
'
R
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyS
:
{
vkey
:
'
VK_S
'
,
value
:
'
s
'
,
withShift
:
'
S
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyT
:
{
vkey
:
'
VK_T
'
,
value
:
'
t
'
,
withShift
:
'
T
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyU
:
{
vkey
:
'
VK_U
'
,
value
:
'
u
'
,
withShift
:
'
U
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyV
:
{
vkey
:
'
VK_V
'
,
value
:
'
v
'
,
withShift
:
'
V
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyW
:
{
vkey
:
'
VK_W
'
,
value
:
'
w
'
,
withShift
:
'
W
'
,
withAltGr
:
'
?
'
,
withShiftAltGr
:
''
},
KeyX
:
{
vkey
:
'
VK_X
'
,
value
:
'
x
'
,
withShift
:
'
X
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyY
:
{
vkey
:
'
VK_Y
'
,
value
:
'
y
'
,
withShift
:
'
Y
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
KeyZ
:
{
vkey
:
'
VK_Z
'
,
value
:
'
z
'
,
withShift
:
'
Z
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Digit1
:
{
vkey
:
'
VK_1
'
,
value
:
'
1
'
,
withShift
:
'
!
'
,
withAltGr
:
'
¹
'
,
withShiftAltGr
:
''
},
Digit2
:
{
vkey
:
'
VK_2
'
,
value
:
'
2
'
,
withShift
:
'
@
'
,
withAltGr
:
'
²
'
,
withShiftAltGr
:
''
},
Digit3
:
{
vkey
:
'
VK_3
'
,
value
:
'
3
'
,
withShift
:
'
#
'
,
withAltGr
:
'
³
'
,
withShiftAltGr
:
''
},
Digit4
:
{
vkey
:
'
VK_4
'
,
value
:
'
4
'
,
withShift
:
'
$
'
,
withAltGr
:
'
£
'
,
withShiftAltGr
:
''
},
Digit5
:
{
vkey
:
'
VK_5
'
,
value
:
'
5
'
,
withShift
:
'
%
'
,
withAltGr
:
'
¢
'
,
withShiftAltGr
:
''
},
Digit6
:
{
vkey
:
'
VK_6
'
,
value
:
'
6
'
,
withShift
:
'
¨
'
,
withAltGr
:
'
¬
'
,
withShiftAltGr
:
''
},
Digit7
:
{
vkey
:
'
VK_7
'
,
value
:
'
7
'
,
withShift
:
'
&
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Digit8
:
{
vkey
:
'
VK_8
'
,
value
:
'
8
'
,
withShift
:
'
*
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Digit9
:
{
vkey
:
'
VK_9
'
,
value
:
'
9
'
,
withShift
:
'
(
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Digit0
:
{
vkey
:
'
VK_0
'
,
value
:
'
0
'
,
withShift
:
'
)
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Enter
:
{
vkey
:
'
VK_RETURN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Escape
:
{
vkey
:
'
VK_ESCAPE
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Backspace
:
{
vkey
:
'
VK_BACK
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Tab
:
{
vkey
:
'
VK_TAB
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Space
:
{
vkey
:
'
VK_SPACE
'
,
value
:
'
'
,
withShift
:
'
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Minus
:
{
vkey
:
'
VK_OEM_MINUS
'
,
value
:
'
-
'
,
withShift
:
'
_
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Equal
:
{
vkey
:
'
VK_OEM_PLUS
'
,
value
:
'
=
'
,
withShift
:
'
+
'
,
withAltGr
:
'
§
'
,
withShiftAltGr
:
''
},
BracketLeft
:
{
vkey
:
'
VK_OEM_4
'
,
value
:
'
´
'
,
withShift
:
'
`
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BracketRight
:
{
vkey
:
'
VK_OEM_6
'
,
value
:
'
[
'
,
withShift
:
'
{
'
,
withAltGr
:
'
ª
'
,
withShiftAltGr
:
''
},
Backslash
:
{
vkey
:
'
VK_OEM_5
'
,
value
:
'
]
'
,
withShift
:
'
}
'
,
withAltGr
:
'
º
'
,
withShiftAltGr
:
''
},
Semicolon
:
{
vkey
:
'
VK_OEM_1
'
,
value
:
'
ç
'
,
withShift
:
'
Ç
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Quote
:
{
vkey
:
'
VK_OEM_7
'
,
value
:
'
~
'
,
withShift
:
'
^
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Backquote
:
{
vkey
:
'
VK_OEM_3
'
,
value
:
'
\'
'
,
withShift
:
'
"
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Comma
:
{
vkey
:
'
VK_OEM_COMMA
'
,
value
:
'
,
'
,
withShift
:
'
<
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Period
:
{
vkey
:
'
VK_OEM_PERIOD
'
,
value
:
'
.
'
,
withShift
:
'
>
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Slash
:
{
vkey
:
'
VK_OEM_2
'
,
value
:
'
;
'
,
withShift
:
'
:
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
CapsLock
:
{
vkey
:
'
VK_CAPITAL
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F1
:
{
vkey
:
'
VK_F1
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F2
:
{
vkey
:
'
VK_F2
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F3
:
{
vkey
:
'
VK_F3
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F4
:
{
vkey
:
'
VK_F4
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F5
:
{
vkey
:
'
VK_F5
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F6
:
{
vkey
:
'
VK_F6
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F7
:
{
vkey
:
'
VK_F7
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F8
:
{
vkey
:
'
VK_F8
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F9
:
{
vkey
:
'
VK_F9
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F10
:
{
vkey
:
'
VK_F10
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F11
:
{
vkey
:
'
VK_F11
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F12
:
{
vkey
:
'
VK_F12
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
PrintScreen
:
{
vkey
:
'
VK_SNAPSHOT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ScrollLock
:
{
vkey
:
'
VK_SCROLL
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Pause
:
{
vkey
:
'
VK_NUMLOCK
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Insert
:
{
vkey
:
'
VK_INSERT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Home
:
{
vkey
:
'
VK_HOME
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
PageUp
:
{
vkey
:
'
VK_PRIOR
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Delete
:
{
vkey
:
'
VK_DELETE
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
End
:
{
vkey
:
'
VK_END
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
PageDown
:
{
vkey
:
'
VK_NEXT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ArrowRight
:
{
vkey
:
'
VK_RIGHT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ArrowLeft
:
{
vkey
:
'
VK_LEFT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ArrowDown
:
{
vkey
:
'
VK_DOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ArrowUp
:
{
vkey
:
'
VK_UP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumLock
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadDivide
:
{
vkey
:
'
VK_DIVIDE
'
,
value
:
'
/
'
,
withShift
:
'
/
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadMultiply
:
{
vkey
:
'
VK_MULTIPLY
'
,
value
:
'
*
'
,
withShift
:
'
*
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadSubtract
:
{
vkey
:
'
VK_SUBTRACT
'
,
value
:
'
-
'
,
withShift
:
'
-
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadAdd
:
{
vkey
:
'
VK_ADD
'
,
value
:
'
+
'
,
withShift
:
'
+
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadEnter
:
{
vkey
:
'
VK_RETURN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad1
:
{
vkey
:
'
VK_END
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad2
:
{
vkey
:
'
VK_DOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad3
:
{
vkey
:
'
VK_NEXT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad4
:
{
vkey
:
'
VK_LEFT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad5
:
{
vkey
:
'
VK_CLEAR
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad6
:
{
vkey
:
'
VK_RIGHT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad7
:
{
vkey
:
'
VK_HOME
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad8
:
{
vkey
:
'
VK_UP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad9
:
{
vkey
:
'
VK_PRIOR
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Numpad0
:
{
vkey
:
'
VK_INSERT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadDecimal
:
{
vkey
:
'
VK_DELETE
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
IntlBackslash
:
{
vkey
:
'
VK_OEM_102
'
,
value
:
'
\\
'
,
withShift
:
'
|
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ContextMenu
:
{
vkey
:
'
VK_APPS
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Power
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadEqual
:
{
vkey
:
'
VK_CLEAR
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F13
:
{
vkey
:
'
VK_F13
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F14
:
{
vkey
:
'
VK_F14
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F15
:
{
vkey
:
'
VK_F15
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F16
:
{
vkey
:
'
VK_F16
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F17
:
{
vkey
:
'
VK_F17
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F18
:
{
vkey
:
'
VK_F18
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F19
:
{
vkey
:
'
VK_F19
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F20
:
{
vkey
:
'
VK_F20
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F21
:
{
vkey
:
'
VK_F21
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F22
:
{
vkey
:
'
VK_F22
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F23
:
{
vkey
:
'
VK_F23
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
F24
:
{
vkey
:
'
VK_F24
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Help
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Undo
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Cut
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Copy
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Paste
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
AudioVolumeMute
:
{
vkey
:
'
VK_VOLUME_MUTE
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
AudioVolumeUp
:
{
vkey
:
'
VK_VOLUME_UP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
AudioVolumeDown
:
{
vkey
:
'
VK_VOLUME_DOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NumpadComma
:
{
vkey
:
'
VK_ABNT_C2
'
,
value
:
'
.
'
,
withShift
:
'
.
'
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
IntlRo
:
{
vkey
:
'
VK_ABNT_C1
'
,
value
:
'
/
'
,
withShift
:
'
?
'
,
withAltGr
:
'
°
'
,
withShiftAltGr
:
''
},
KanaMode
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
IntlYen
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Convert
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
NonConvert
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Lang1
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Lang2
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Lang3
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Lang4
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ControlLeft
:
{
vkey
:
'
VK_CONTROL
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ShiftLeft
:
{
vkey
:
'
VK_SHIFT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
AltLeft
:
{
vkey
:
'
VK_MENU
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MetaLeft
:
{
vkey
:
'
VK_LWIN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ControlRight
:
{
vkey
:
'
VK_CONTROL
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
ShiftRight
:
{
vkey
:
'
VK_SHIFT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
AltRight
:
{
vkey
:
'
VK_MENU
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MetaRight
:
{
vkey
:
'
VK_RWIN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MediaTrackNext
:
{
vkey
:
'
VK_MEDIA_NEXT_TRACK
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MediaTrackPrevious
:
{
vkey
:
'
VK_MEDIA_PREV_TRACK
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MediaStop
:
{
vkey
:
'
VK_MEDIA_STOP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
Eject
:
{
vkey
:
'
VK_UNKNOWN
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MediaPlayPause
:
{
vkey
:
'
VK_MEDIA_PLAY_PAUSE
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
MediaSelect
:
{
vkey
:
'
VK_LAUNCH_MEDIA_SELECT
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
LaunchMail
:
{
vkey
:
'
VK_LAUNCH_MAIL
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
LaunchApp2
:
{
vkey
:
'
VK_LAUNCH_APP2
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
LaunchApp1
:
{
vkey
:
'
VK_LAUNCH_APP1
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserSearch
:
{
vkey
:
'
VK_BROWSER_SEARCH
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserHome
:
{
vkey
:
'
VK_BROWSER_HOME
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserBack
:
{
vkey
:
'
VK_BROWSER_BACK
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserForward
:
{
vkey
:
'
VK_BROWSER_FORWARD
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserStop
:
{
vkey
:
'
VK_BROWSER_STOP
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserRefresh
:
{
vkey
:
'
VK_BROWSER_REFRESH
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
},
BrowserFavorites
:
{
vkey
:
'
VK_BROWSER_FAVORITES
'
,
value
:
''
,
withShift
:
''
,
withAltGr
:
''
,
withShiftAltGr
:
''
}
});
\ No newline at end of file
src/vs/workbench/services/keybinding/test/win_por_ptb.txt
0 → 100644
浏览文件 @
e968d3ce
此差异已折叠。
点击以展开。
src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts
浏览文件 @
e968d3ce
...
...
@@ -406,6 +406,69 @@ suite('keyboardMapper - WINDOWS en_us', () => {
});
});
suite
(
'
keyboardMapper - WINDOWS por_ptb
'
,
()
=>
{
let
mapper
:
WindowsKeyboardMapper
;
suiteSetup
((
done
)
=>
{
createKeyboardMapper
(
'
win_por_ptb
'
).
then
((
_mapper
)
=>
{
mapper
=
_mapper
;
done
();
},
done
);
});
test
(
'
mapping
'
,
(
done
)
=>
{
assertMapping
(
WRITE_FILE_IF_DIFFERENT
,
mapper
,
'
win_por_ptb.txt
'
,
done
);
});
test
(
'
resolveKeyboardEvent Ctrl+[IntlRo]
'
,
()
=>
{
assertResolveKeyboardEvent
(
mapper
,
{
ctrlKey
:
true
,
shiftKey
:
false
,
altKey
:
false
,
metaKey
:
false
,
keyCode
:
KeyCode
.
ABNT_C1
,
code
:
null
},
{
label
:
'
Ctrl+/
'
,
ariaLabel
:
'
Control+/
'
,
electronAccelerator
:
'
Ctrl+ABNT_C1
'
,
userSettingsLabel
:
'
ctrl+abnt_c1
'
,
isWYSIWYG
:
false
,
isChord
:
false
,
dispatchParts
:
[
'
ctrl+ABNT_C1
'
,
null
],
}
);
});
test
(
'
resolveKeyboardEvent Ctrl+[NumpadComma]
'
,
()
=>
{
assertResolveKeyboardEvent
(
mapper
,
{
ctrlKey
:
true
,
shiftKey
:
false
,
altKey
:
false
,
metaKey
:
false
,
keyCode
:
KeyCode
.
ABNT_C2
,
code
:
null
},
{
label
:
'
Ctrl+.
'
,
ariaLabel
:
'
Control+.
'
,
electronAccelerator
:
'
Ctrl+ABNT_C2
'
,
userSettingsLabel
:
'
ctrl+abnt_c2
'
,
isWYSIWYG
:
false
,
isChord
:
false
,
dispatchParts
:
[
'
ctrl+ABNT_C2
'
,
null
],
}
);
});
});
suite
(
'
misc
'
,
()
=>
{
test
(
'
issue #23513: Toggle Sidebar Visibility and Go to Line display same key mapping in Arabic keyboard
'
,
()
=>
{
const
mapper
=
new
WindowsKeyboardMapper
({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录