Fix menu scancode. (#586)
* Fix menu scancode. * Change the old menu key scancode 118 to 101. * validate scancodes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { Select2OptionData, Select2TemplateFunction } from 'ng2-select2';
|
||||
import { KeyAction, KeystrokeAction, KeystrokeType } from 'uhk-common';
|
||||
import { KeyAction, KeystrokeAction, KeystrokeType, SCANCODES, SECONDARY_ROLES } from 'uhk-common';
|
||||
|
||||
import { Tab } from '../tab';
|
||||
import { MapperService } from '../../../../services/mapper.service';
|
||||
@@ -35,8 +35,8 @@ export class KeypressTabComponent extends Tab implements OnChanges {
|
||||
id: '0',
|
||||
text: 'None'
|
||||
}];
|
||||
this.scanCodeGroups = this.scanCodeGroups.concat(require('./scancodes.json'));
|
||||
this.secondaryRoleGroups = require('./secondaryRole.json');
|
||||
this.scanCodeGroups = this.scanCodeGroups.concat(SCANCODES);
|
||||
this.secondaryRoleGroups = SECONDARY_ROLES;
|
||||
this.leftModifierSelects = Array(this.leftModifiers.length).fill(false);
|
||||
this.rightModifierSelects = Array(this.rightModifiers.length).fill(false);
|
||||
this.selectedScancodeOption = this.scanCodeGroups[0];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "-1",
|
||||
"text": "None"
|
||||
},
|
||||
{
|
||||
"text": "Layer switcher",
|
||||
"children": [
|
||||
{
|
||||
"id": "8",
|
||||
"text": "Mod"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"text": "Fn"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"text": "Mouse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Modifier",
|
||||
"children": [
|
||||
{
|
||||
"id": "0",
|
||||
"text": "LShift"
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"text": "LCtrl"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"text": "LSuper"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"text": "LAlt"
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"text": "RShift"
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"text": "RCtrl"
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"text": "RSuper"
|
||||
},
|
||||
{
|
||||
"id": "7",
|
||||
"text": "RAlt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user