From 1d376cad55261552d852688b9f1e72b92c59ca72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 15 Jun 2017 23:59:02 +0200 Subject: [PATCH] Fix typo. --- .../config-items/key-action/KeystrokeAction.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts b/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts index 6e8255fa..9e168030 100644 --- a/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts +++ b/shared/src/config-serializer/config-items/key-action/KeystrokeAction.ts @@ -85,7 +85,7 @@ export class KeystrokeAction extends KeyAction { fromBinary(buffer: UhkBuffer): KeystrokeAction { const keyActionId: KeyActionId = this.readAndAssertKeyActionId(buffer); - const flags: number = keyActionId - KeyActionId.NoneAction; // NoneAction is the same is an empty KeystrokeAction + const flags: number = keyActionId - KeyActionId.NoneAction; // NoneAction is the same as an empty KeystrokeAction. this.type = (flags >> 3) & 0b11; if (flags & KeystrokeActionFlag.scancode) { this._scancode = this.type === KeystrokeType.longMedia ? buffer.readUInt16() : buffer.readUInt8(); @@ -149,9 +149,7 @@ export class KeystrokeAction extends KeyAction { const TYPE_OFFSET = flags + (this.type << KEYSTROKE_ACTION_FLAG_LENGTH); - // A keystroke action without scancode, modifiers, and long press - // action is just like a none action, so they overlap on purpose. - buffer.writeUInt8(KeyActionId.NoneAction + TYPE_OFFSET); + buffer.writeUInt8(KeyActionId.NoneAction + TYPE_OFFSET); // NoneAction is the same as an empty KeystrokeAction. for (let i = 0; i < toWrite.length; ++i) { if (toWrite[i].long) {