From 17e56fdf7c902cf72c5642cd0bc9009aeb606ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Wed, 30 Mar 2016 02:19:10 +0200 Subject: [PATCH] Add KeyActionId enum. --- config-serializer/config-items/KeyAction.ts | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config-serializer/config-items/KeyAction.ts b/config-serializer/config-items/KeyAction.ts index 26c06c57..a6baff49 100644 --- a/config-serializer/config-items/KeyAction.ts +++ b/config-serializer/config-items/KeyAction.ts @@ -1,3 +1,29 @@ +// A KeyAction is composed of 2 bytes in the RAM of the UHK: id byte, and param byte. +// Id denotes the subclass of the KeyAction and param is subclass-specific. + +enum KeyActionId { + NoneAction = 0, + KeyStrokeActionFirst = TypeChecker.firstValidScancode, // 1 + // Intermediary scancodes = 2 to 230 + KeyStrokeActionLast = TypeChecker.lastValidScancode, // 231 + SwitchLayerAction = 232, + SwitchKeymapAction = 233, + MouseAction = 234, + PlayMacroAction = 235, + DualRoleActionLeftCtrl = 236, + DualRoleActionLeftShift = 237, + DualRoleActionLeftAlt = 238, + DualRoleActionLeftSuper = 239, + DualRoleActionRightCtrl = 240, + DualRoleActionRightShift = 241, + DualRoleActionRightAlt = 242, + DualRoleActionRightSuper = 243, + DualRoleActionMod = 244, + DualRoleActionFn = 245, + DualRoleActionMouse = 246 + // Let's leave space for further layers - additional actions should descend from 255 +} + class KeyAction { static fromJsObject(jsObject: any): KeyAction {