Rename actionType to keyActionType and macroActionType respectively.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
class KeyAction {
|
class KeyAction {
|
||||||
|
|
||||||
static fromJsObject(jsObject: any): KeyAction {
|
static fromJsObject(jsObject: any): KeyAction {
|
||||||
switch (jsObject.actionType) {
|
switch (jsObject.keyActionType) {
|
||||||
case 'none':
|
case 'none':
|
||||||
let keyActionNone = new KeyActionNone();
|
let keyActionNone = new KeyActionNone();
|
||||||
keyActionNone.fromJsObject(jsObject);
|
keyActionNone.fromJsObject(jsObject);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class KeystrokeAction extends KeyAction implements Serializable {
|
|||||||
|
|
||||||
toJsObject(): any {
|
toJsObject(): any {
|
||||||
return {
|
return {
|
||||||
|
keyActionType: 'keystroke',
|
||||||
scancode: this.scancode,
|
scancode: this.scancode,
|
||||||
modifierMask: this.modifierMask
|
modifierMask: this.modifierMask
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,33 +28,33 @@
|
|||||||
],
|
],
|
||||||
"keyActions": [
|
"keyActions": [
|
||||||
{
|
{
|
||||||
"actionType": "none"
|
"keyActionType": "none"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "keystroke",
|
"keyActionType": "keystroke",
|
||||||
"scancode": 120,
|
"scancode": 120,
|
||||||
"modifierMask": 16
|
"modifierMask": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "switchLayer",
|
"keyActionType": "switchLayer",
|
||||||
"layer": "fn",
|
"layer": "fn",
|
||||||
"toggle": false
|
"toggle": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "dualRoleKeystroke",
|
"keyActionType": "dualRoleKeystroke",
|
||||||
"scancode": 111,
|
"scancode": 111,
|
||||||
"longPressAction": "mod"
|
"longPressAction": "mod"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "mouse",
|
"keyActionType": "mouse",
|
||||||
"mouseAction": "scrollDown"
|
"mouseAction": "scrollDown"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "playMacro",
|
"keyActionType": "playMacro",
|
||||||
"macroId": 0
|
"macroId": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "switchKeymap",
|
"keyActionType": "switchKeymap",
|
||||||
"keymapId": 1
|
"keymapId": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -96,57 +96,57 @@
|
|||||||
"isLooped": false,
|
"isLooped": false,
|
||||||
"macroActions": [
|
"macroActions": [
|
||||||
{
|
{
|
||||||
"actionType": "pressKey",
|
"macroActionType": "pressKey",
|
||||||
"scancode": 111
|
"scancode": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "holdKey",
|
"macroActionType": "holdKey",
|
||||||
"scancode": 111
|
"scancode": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "releaseKey",
|
"macroActionType": "releaseKey",
|
||||||
"scancode": 111
|
"scancode": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "pressModifiers",
|
"macroActionType": "pressModifiers",
|
||||||
"modifierMask": 111
|
"modifierMask": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "holdModifiers",
|
"macroActionType": "holdModifiers",
|
||||||
"modifierMask": 111
|
"modifierMask": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "releaseModifiers",
|
"macroActionType": "releaseModifiers",
|
||||||
"modifierMask": 111
|
"modifierMask": 111
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "pressMouseButtons",
|
"macroActionType": "pressMouseButtons",
|
||||||
"mouseButtonsMask": 9
|
"mouseButtonsMask": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "holdMouseButtons",
|
"macroActionType": "holdMouseButtons",
|
||||||
"mouseButtonsMask": 9
|
"mouseButtonsMask": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "releaseMouseButtons",
|
"macroActionType": "releaseMouseButtons",
|
||||||
"mouseButtonsMask": 9
|
"mouseButtonsMask": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "moveMouse",
|
"macroActionType": "moveMouse",
|
||||||
"x": 123,
|
"x": 123,
|
||||||
"y": 123
|
"y": 123
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "scrollMouse",
|
"macroActionType": "scrollMouse",
|
||||||
"x": 123,
|
"x": 123,
|
||||||
"y": 123
|
"y": 123
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "delay",
|
"macroActionType": "delay",
|
||||||
"delay": "1000"
|
"delay": "1000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"actionType": "text",
|
"macroActionType": "text",
|
||||||
"text": "this is a text"
|
"text": "this is a text"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user