Add scancodes to keypress-tab.
This commit is contained in:
@@ -18,7 +18,11 @@ import {IconComponent} from '../widgets/icon.component';
|
|||||||
<div class="scancode-options" style="margin-bottom:10px; margin-top:2px">
|
<div class="scancode-options" style="margin-bottom:10px; margin-top:2px">
|
||||||
<b class="setting-label" style="position:relative; top:2px;">Scancode:</b>
|
<b class="setting-label" style="position:relative; top:2px;">Scancode:</b>
|
||||||
<select class="scancode" style="width: 200px">
|
<select class="scancode" style="width: 200px">
|
||||||
|
<optgroup *ngFor="let group of scancodeGroups" [label]="group.groupName">
|
||||||
|
<option *ngFor="let item of group.groupValues">
|
||||||
|
{{ item.label }}
|
||||||
|
</option>
|
||||||
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
<capture-keystroke-button></capture-keystroke-button>
|
<capture-keystroke-button></capture-keystroke-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,9 +74,15 @@ export class KeypressTabComponent implements OnInit, KeyActionSaver {
|
|||||||
private leftModifierSelects: boolean[];
|
private leftModifierSelects: boolean[];
|
||||||
private rightModifierSelects: boolean[];
|
private rightModifierSelects: boolean[];
|
||||||
|
|
||||||
|
private scancodeGroups: {
|
||||||
|
groupName: string;
|
||||||
|
groupValues: any[];
|
||||||
|
}[];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.leftModifiers = ['LShift', 'LCtrl', 'LSuper', 'LAlt'];
|
this.leftModifiers = ['LShift', 'LCtrl', 'LSuper', 'LAlt'];
|
||||||
this.rightModifiers = ['RShift', 'RCtrl', 'RSuper', 'RAlt'];
|
this.rightModifiers = ['RShift', 'RCtrl', 'RSuper', 'RAlt'];
|
||||||
|
this.scancodeGroups = require('json!./scancodes.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() { }
|
ngOnInit() { }
|
||||||
|
|||||||
572
src/components/popover/tab/scancodes.json
Normal file
572
src/components/popover/tab/scancodes.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user