diff --git a/config-serializer/config-items/DualRoleKeystrokeAction.ts b/config-serializer/config-items/DualRoleKeystrokeAction.ts index 0bc45377..95494901 100644 --- a/config-serializer/config-items/DualRoleKeystrokeAction.ts +++ b/config-serializer/config-items/DualRoleKeystrokeAction.ts @@ -21,7 +21,7 @@ class DualRoleKeystrokeAction extends KeyAction { private longPressAction: LongPressAction; _fromJsObject(jsObject: any): DualRoleKeystrokeAction { - this.assertKeyActionType(jsObject, KeyActionType.DualRoleKeystrokeAction, 'DualRoleKeystrokeAction'); + this.assertKeyActionType(jsObject, keyActionType.DualRoleKeystrokeAction, 'DualRoleKeystrokeAction'); this.scancode = jsObject.scancode; this.longPressAction = LongPressAction[ jsObject.longPressAction]; return this; @@ -36,7 +36,7 @@ class DualRoleKeystrokeAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.DualRoleKeystrokeAction, + keyActionType: keyActionType.DualRoleKeystrokeAction, scancode: this.scancode, longPressAction: LongPressAction[this.longPressAction] }; diff --git a/config-serializer/config-items/KeyActions.ts b/config-serializer/config-items/KeyActions.ts index 4848ae26..965842af 100644 --- a/config-serializer/config-items/KeyActions.ts +++ b/config-serializer/config-items/KeyActions.ts @@ -2,23 +2,23 @@ class KeyActions extends ClassArray { jsObjectToClass(jsObject: any): Serializable { switch (jsObject.keyActionType) { - case KeyActionType.NoneAction: + case keyActionType.NoneAction: return new NoneAction().fromJsObject(jsObject); - case KeyActionType.KeystrokeAction: + case keyActionType.KeystrokeAction: return new KeystrokeAction().fromJsObject(jsObject); - case KeyActionType.KeystrokeModifiersAction: + case keyActionType.KeystrokeModifiersAction: return new KeystrokeModifiersAction().fromJsObject(jsObject); - case KeyActionType.KeystrokeWithModifiersAction: + case keyActionType.KeystrokeWithModifiersAction: return new KeystrokeWithModifiersAction().fromJsObject(jsObject); - case KeyActionType.DualRoleKeystrokeAction: + case keyActionType.DualRoleKeystrokeAction: return new DualRoleKeystrokeAction().fromJsObject(jsObject); - case KeyActionType.SwitchLayerAction: + case keyActionType.SwitchLayerAction: return new SwitchLayerAction().fromJsObject(jsObject); - case KeyActionType.SwitchKeymapAction: + case keyActionType.SwitchKeymapAction: return new SwitchKeymapAction().fromJsObject(jsObject); - case KeyActionType.MouseAction: + case keyActionType.MouseAction: return new MouseAction().fromJsObject(jsObject); - case KeyActionType.PlayMacroAction: + case keyActionType.PlayMacroAction: return new PlayMacroAction().fromJsObject(jsObject); default: throw `Invalid KeyAction.keyActionType: "${jsObject.actionType}"`; diff --git a/config-serializer/config-items/KeystrokeAction.ts b/config-serializer/config-items/KeystrokeAction.ts index 0afaac1f..255b26c3 100644 --- a/config-serializer/config-items/KeystrokeAction.ts +++ b/config-serializer/config-items/KeystrokeAction.ts @@ -4,7 +4,7 @@ class KeystrokeAction extends KeyAction { scancode: number; _fromJsObject(jsObject: any): KeystrokeAction { - this.assertKeyActionType(jsObject, KeyActionType.KeystrokeAction, 'KeystrokeAction'); + this.assertKeyActionType(jsObject, keyActionType.KeystrokeAction, 'KeystrokeAction'); this.scancode = jsObject.scancode; return this; } @@ -17,7 +17,7 @@ class KeystrokeAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.KeystrokeAction, + keyActionType: keyActionType.KeystrokeAction, scancode: this.scancode }; } diff --git a/config-serializer/config-items/KeystrokeModifiersAction.ts b/config-serializer/config-items/KeystrokeModifiersAction.ts index 0a580dc0..9a7013fe 100644 --- a/config-serializer/config-items/KeystrokeModifiersAction.ts +++ b/config-serializer/config-items/KeystrokeModifiersAction.ts @@ -5,7 +5,7 @@ class KeystrokeModifiersAction extends KeyAction { _fromJsObject(jsObject: any): KeystrokeModifiersAction { this.assertKeyActionType( - jsObject, KeyActionType.KeystrokeModifiersAction, 'KeystrokeModifiersAction'); + jsObject, keyActionType.KeystrokeModifiersAction, 'KeystrokeModifiersAction'); this.modifierMask = jsObject.modifierMask; return this; } @@ -18,7 +18,7 @@ class KeystrokeModifiersAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.KeystrokeModifiersAction, + keyActionType: keyActionType.KeystrokeModifiersAction, modifierMask: this.modifierMask }; } diff --git a/config-serializer/config-items/KeystrokeWithModifiersAction.ts b/config-serializer/config-items/KeystrokeWithModifiersAction.ts index 0eb25a3c..fb3b91a4 100644 --- a/config-serializer/config-items/KeystrokeWithModifiersAction.ts +++ b/config-serializer/config-items/KeystrokeWithModifiersAction.ts @@ -8,7 +8,7 @@ class KeystrokeWithModifiersAction extends KeyAction { _fromJsObject(jsObject: any): KeystrokeWithModifiersAction { this.assertKeyActionType( - jsObject, KeyActionType.KeystrokeWithModifiersAction, 'KeystrokeWithModifiersAction'); + jsObject, keyActionType.KeystrokeWithModifiersAction, 'KeystrokeWithModifiersAction'); this.scancode = jsObject.scancode; this.modifierMask = jsObject.modifierMask; return this; @@ -23,7 +23,7 @@ class KeystrokeWithModifiersAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.KeystrokeWithModifiersAction, + keyActionType: keyActionType.KeystrokeWithModifiersAction, scancode: this.scancode, modifierMask: this.modifierMask }; diff --git a/config-serializer/config-items/MouseAction.ts b/config-serializer/config-items/MouseAction.ts index 6b505a24..345dc948 100644 --- a/config-serializer/config-items/MouseAction.ts +++ b/config-serializer/config-items/MouseAction.ts @@ -20,7 +20,7 @@ class MouseAction extends KeyAction { mouseAction: MouseActionParam; _fromJsObject(jsObject: any): MouseAction { - this.assertKeyActionType(jsObject, KeyActionType.MouseAction, 'MouseAction'); + this.assertKeyActionType(jsObject, keyActionType.MouseAction, 'MouseAction'); this.mouseAction = MouseActionParam[ jsObject.mouseAction]; return this; } @@ -33,7 +33,7 @@ class MouseAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.MouseAction, + keyActionType: keyActionType.MouseAction, mouseAction: MouseActionParam[this.mouseAction] }; } diff --git a/config-serializer/config-items/PlayMacroAction.ts b/config-serializer/config-items/PlayMacroAction.ts index 852dcadb..c0c9e0f5 100644 --- a/config-serializer/config-items/PlayMacroAction.ts +++ b/config-serializer/config-items/PlayMacroAction.ts @@ -4,7 +4,7 @@ class PlayMacroAction extends KeyAction { macroId: number; _fromJsObject(jsObject: any): PlayMacroAction { - this.assertKeyActionType(jsObject, KeyActionType.PlayMacroAction, 'PlayMacroAction'); + this.assertKeyActionType(jsObject, keyActionType.PlayMacroAction, 'PlayMacroAction'); this.macroId = jsObject.macroId; return this; } @@ -17,7 +17,7 @@ class PlayMacroAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.PlayMacroAction, + keyActionType: keyActionType.PlayMacroAction, macroId: this.macroId }; } diff --git a/config-serializer/config-items/SwitchKeymapAction.ts b/config-serializer/config-items/SwitchKeymapAction.ts index f377caac..3156e7ff 100644 --- a/config-serializer/config-items/SwitchKeymapAction.ts +++ b/config-serializer/config-items/SwitchKeymapAction.ts @@ -4,7 +4,7 @@ class SwitchKeymapAction extends KeyAction { keymapId: number; _fromJsObject(jsObject: any): SwitchKeymapAction { - this.assertKeyActionType(jsObject, KeyActionType.SwitchKeymapAction, 'SwitchKeymapAction'); + this.assertKeyActionType(jsObject, keyActionType.SwitchKeymapAction, 'SwitchKeymapAction'); this.keymapId = jsObject.keymapId; return this; } @@ -17,7 +17,7 @@ class SwitchKeymapAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.SwitchKeymapAction, + keyActionType: keyActionType.SwitchKeymapAction, keymapId: this.keymapId }; } diff --git a/config-serializer/config-items/SwitchLayerAction.ts b/config-serializer/config-items/SwitchLayerAction.ts index b5a3446d..0c8d4a3d 100644 --- a/config-serializer/config-items/SwitchLayerAction.ts +++ b/config-serializer/config-items/SwitchLayerAction.ts @@ -18,7 +18,7 @@ class SwitchLayerAction extends KeyAction { } _fromJsObject(jsObject: any): SwitchLayerAction { - this.assertKeyActionType(jsObject, KeyActionType.SwitchLayerAction, 'SwitchLayerAction'); + this.assertKeyActionType(jsObject, keyActionType.SwitchLayerAction, 'SwitchLayerAction'); this.layer = Layer[ jsObject.layer]; this.isLayerToggleable = jsObject.toggle; return this; @@ -35,7 +35,7 @@ class SwitchLayerAction extends KeyAction { _toJsObject(): any { return { - keyActionType: KeyActionType.SwitchLayerAction, + keyActionType: keyActionType.SwitchLayerAction, layer: Layer[this.layer], toggle: this.isLayerToggleable };