Add keymap downloading

Closes #199
This commit is contained in:
Farkas József
2017-02-14 20:35:50 +01:00
committed by József Farkas
parent 61c20cd678
commit 8aa2029f55
12 changed files with 74 additions and 8 deletions
@@ -3,6 +3,7 @@ import { UhkBuffer } from '../UhkBuffer';
import { Helper as KeyActionHelper, KeyAction, NoneAction } from './key-action';
import { Keymap } from './Keymap';
import { Macro } from './Macro';
import { PlayMacroAction, SwitchLayerAction } from './key-action';
enum PointerRole {
none,
@@ -54,7 +55,7 @@ export class Module {
id: this.id,
pointerRole: PointerRole[this.pointerRole],
keyActions: this.keyActions.map(keyAction => {
if (keyAction) {
if (keyAction && (macros || !(keyAction instanceof PlayMacroAction || keyAction instanceof SwitchLayerAction))) {
return keyAction.toJsonObject(macros);
}
})