From 4bd1c8b3e9017f86ae81389d3038800fec2a85e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Wed, 30 Mar 2016 12:59:03 +0200 Subject: [PATCH] Let's not duplicate part of the KeyActionId enum as LongPressActionId because duplication should only cause troubles down the road. --- .../config-items/DualRoleKeystrokeAction.ts | 23 +++-------- config-serializer/config-items/KeyAction.ts | 38 +++++++++---------- 2 files changed, 24 insertions(+), 37 deletions(-) diff --git a/config-serializer/config-items/DualRoleKeystrokeAction.ts b/config-serializer/config-items/DualRoleKeystrokeAction.ts index bdb512cc..653b3b92 100644 --- a/config-serializer/config-items/DualRoleKeystrokeAction.ts +++ b/config-serializer/config-items/DualRoleKeystrokeAction.ts @@ -1,23 +1,9 @@ -enum LongPressActionId { - leftCtrl = 236, // KeyActionId.DualRoleActionLeftCtrl - leftShift, - leftAlt, - leftSuper, - rightCtrl, - rightShift, - rightAlt, - rightSuper, - mod, - fn, - mouse, -} - class DualRoleKeystrokeAction extends KeyAction implements Serializable { static keyActionTypeString = 'dualRoleKeystroke'; public scancode; - private _longPressAction: LongPressActionId; + private _longPressAction: KeyActionId; get longPressAction(): number { return this._longPressAction; @@ -30,8 +16,9 @@ class DualRoleKeystrokeAction extends KeyAction implements Serializable