SwitchKeymap rendering
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {Serializable} from '../Serializable';
|
||||
import {ModuleConfigurations} from './ModuleConfigurations';
|
||||
import {KeyMaps} from './KeyMaps';
|
||||
import {KeyMap} from './KeyMap';
|
||||
import {Macros} from './Macros';
|
||||
import {UhkBuffer} from '../UhkBuffer';
|
||||
import {assertUInt8, assertUInt32} from '../assert';
|
||||
@@ -85,4 +86,13 @@ export class UhkConfiguration extends Serializable<UhkConfiguration> {
|
||||
toString(): string {
|
||||
return `<UhkConfiguration signature="${this.signature}">`;
|
||||
}
|
||||
|
||||
getKeymap(keymapId: number): KeyMap {
|
||||
let keyMaps: KeyMap[] = this.keyMaps.elements;
|
||||
for (let i = 0; i < keyMaps.length; ++i) {
|
||||
if (keymapId === keyMaps[i].id) {
|
||||
return keyMaps[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,7 +392,8 @@
|
||||
"keyActionType": "none"
|
||||
},
|
||||
{
|
||||
"keyActionType": "none"
|
||||
"keyActionType": "switchKeymap",
|
||||
"keymapId": 2
|
||||
},
|
||||
{
|
||||
"keyActionType": "none"
|
||||
@@ -824,6 +825,28 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"isDefault": false,
|
||||
"abbreviation": "DVR",
|
||||
"name": "DVR",
|
||||
"layers": [
|
||||
{
|
||||
"modules": [
|
||||
{
|
||||
"id": 0,
|
||||
"pointerRole": "move",
|
||||
"keyActions": []
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"pointerRole": "move",
|
||||
"keyActions": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"macros": [
|
||||
|
||||
Reference in New Issue
Block a user