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

Add TODOs where chord assumptions are made

上级 335c0675
...@@ -22,6 +22,7 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { ...@@ -22,6 +22,7 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding {
if (!actual) { if (!actual) {
throw new Error(`Invalid USLayoutResolvedKeybinding`); throw new Error(`Invalid USLayoutResolvedKeybinding`);
} else if (actual.type === KeybindingType.Chord) { } else if (actual.type === KeybindingType.Chord) {
// TODO@chords
this._firstPart = actual.parts[0]; this._firstPart = actual.parts[0];
this._chordPart = actual.parts[1]; this._chordPart = actual.parts[1];
} else { } else {
......
...@@ -347,6 +347,7 @@ suite('KeybindingResolver', () => { ...@@ -347,6 +347,7 @@ suite('KeybindingResolver', () => {
const expectedKey = createKeybinding(_expectedKey, OS); const expectedKey = createKeybinding(_expectedKey, OS);
if (expectedKey.type === KeybindingType.Chord) { if (expectedKey.type === KeybindingType.Chord) {
// TODO@chords
let firstPart = getDispatchStr(expectedKey.parts[0]); let firstPart = getDispatchStr(expectedKey.parts[0]);
let chordPart = getDispatchStr(expectedKey.parts[1]); let chordPart = getDispatchStr(expectedKey.parts[1]);
......
...@@ -1015,6 +1015,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { ...@@ -1015,6 +1015,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper {
let result: NativeResolvedKeybinding[] = [], resultLen = 0; let result: NativeResolvedKeybinding[] = [], resultLen = 0;
if (keybinding.type === KeybindingType.Chord) { if (keybinding.type === KeybindingType.Chord) {
// TODO@chords
const firstParts = this.simpleKeybindingToScanCodeBinding(keybinding.parts[0]); const firstParts = this.simpleKeybindingToScanCodeBinding(keybinding.parts[0]);
const chordParts = this.simpleKeybindingToScanCodeBinding(keybinding.parts[1]); const chordParts = this.simpleKeybindingToScanCodeBinding(keybinding.parts[1]);
......
...@@ -519,6 +519,7 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { ...@@ -519,6 +519,7 @@ export class WindowsKeyboardMapper implements IKeyboardMapper {
public resolveKeybinding(keybinding: Keybinding): WindowsNativeResolvedKeybinding[] { public resolveKeybinding(keybinding: Keybinding): WindowsNativeResolvedKeybinding[] {
if (keybinding.type === KeybindingType.Chord) { if (keybinding.type === KeybindingType.Chord) {
// TODO@chords
const firstPartKeyCode = keybinding.parts[0].keyCode; const firstPartKeyCode = keybinding.parts[0].keyCode;
const chordPartKeyCode = keybinding.parts[1].keyCode; const chordPartKeyCode = keybinding.parts[1].keyCode;
if (!this._keyCodeExists[firstPartKeyCode] || !this._keyCodeExists[chordPartKeyCode]) { if (!this._keyCodeExists[firstPartKeyCode] || !this._keyCodeExists[chordPartKeyCode]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册