提交 bbbe404c 编写于 作者: A Alex Dima

Avoid missing out on some modifier combinations

上级 32de5ac1
......@@ -197,17 +197,32 @@ export class KeyboardMapper {
// Handle all `withShiftAltGr` entries
for (let i = mappings.length - 1; i >= 0; i--) {
const mapping = mappings[i];
this._registerCharCode(mapping.code, true, true, true, mapping.withShiftAltGr);
const withShiftAltGr = mapping.withShiftAltGr;
if (withShiftAltGr === mapping.withAltGr || withShiftAltGr === mapping.withShift || withShiftAltGr === mapping.value) {
// handled below
continue;
}
this._registerCharCode(mapping.code, true, true, true, withShiftAltGr);
}
// Handle all `withAltGr` entries
for (let i = mappings.length - 1; i >= 0; i--) {
const mapping = mappings[i];
this._registerCharCode(mapping.code, true, false, true, mapping.withAltGr);
const withAltGr = mapping.withAltGr;
if (withAltGr === mapping.withShift || withAltGr === mapping.value) {
// handled below
continue;
}
this._registerCharCode(mapping.code, true, false, true, withAltGr);
}
// Handle all `withShift` entries
for (let i = mappings.length - 1; i >= 0; i--) {
const mapping = mappings[i];
this._registerCharCode(mapping.code, false, true, false, mapping.withShift);
const withShift = mapping.withShift;
if (withShift === mapping.value) {
// handled below
continue;
}
this._registerCharCode(mapping.code, false, true, false, withShift);
}
// Handle all `value` entries
for (let i = mappings.length - 1; i >= 0; i--) {
......
......@@ -40,7 +40,7 @@
| Alt+KeyE | e | Alt+E | Alt+E |
| Ctrl+Alt+KeyE | € | Ctrl+Alt+E | Ctrl+Alt+E |
| Shift+Alt+KeyE | E | Shift+Alt+E | Shift+Alt+E |
| Ctrl+Shift+Alt+KeyE | E | Shift+E | Ctrl+Shift+Alt+E |
| Ctrl+Shift+Alt+KeyE | E | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E |
--------------------------------------------------------------------------------------------------
| HW Code combination | Key | KeyCode combination | UI label |
--------------------------------------------------------------------------------------------------
......@@ -116,9 +116,9 @@
| Shift+KeyN | N | Shift+N | Shift+N |
| Ctrl+Shift+KeyN | N | Ctrl+Shift+N | Ctrl+Shift+N |
| Alt+KeyN | n | Alt+N | Alt+N |
| Ctrl+Alt+KeyN | n | N | Ctrl+Alt+N |
| Ctrl+Alt+KeyN | n | Ctrl+Alt+N | Ctrl+Alt+N |
| Shift+Alt+KeyN | N | Shift+Alt+N | Shift+Alt+N |
| Ctrl+Shift+Alt+KeyN | N | Shift+N | Ctrl+Shift+Alt+N |
| Ctrl+Shift+Alt+KeyN | N | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N |
| KeyO | o | O | O |
| Ctrl+KeyO | o | Ctrl+O | Ctrl+O |
| Shift+KeyO | O | Shift+O | Shift+O |
......
......@@ -266,7 +266,7 @@
| Alt+Digit5 | 5 | Alt+5 | Alt+5 |
| Ctrl+Alt+Digit5 | [ | [ | Ctrl+Alt+5 |
| Shift+Alt+Digit5 | % | Shift+Alt+5 | Shift+Alt+5 |
| Ctrl+Shift+Alt+Digit5 | [ | [ | Ctrl+Shift+Alt+5 |
| Ctrl+Shift+Alt+Digit5 | [ | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+5 |
| Digit6 | 6 | 6 | 6 |
| Ctrl+Digit6 | 6 | Ctrl+6 | Ctrl+6 |
| Shift+Digit6 | & | Shift+6 | Shift+6 |
......@@ -274,7 +274,7 @@
| Alt+Digit6 | 6 | Alt+6 | Alt+6 |
| Ctrl+Alt+Digit6 | ] | ] | Ctrl+Alt+6 |
| Shift+Alt+Digit6 | & | Shift+Alt+6 | Shift+Alt+6 |
| Ctrl+Shift+Alt+Digit6 | ] | ] | Ctrl+Shift+Alt+6 |
| Ctrl+Shift+Alt+Digit6 | ] | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+6 |
| Digit7 | 7 | 7 | 7 |
| Ctrl+Digit7 | 7 | Ctrl+7 | Ctrl+7 |
| Shift+Digit7 | / | / | Shift+7 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册