Media key support (#294)
* Introduce type for KeystrokeAction * Increment dataModelVersion New property 'type' for KeystrokeAction * Mapping for media keys * Media key selecting support for KeypressTab * refactor: Use more meaningful name (selectedScancodeOption) * Store the keystroke type in key action type instead of a new field
This commit is contained in:
committed by
László Monda
parent
8e823b57b4
commit
efe7e95b3e
@@ -220,7 +220,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
if (!keyAction.hasActiveModifier() && keyAction.hasScancode()) {
|
||||
const scancode: number = keyAction.scancode;
|
||||
newLabelSource = this.mapper.scanCodeToText(scancode);
|
||||
newLabelSource = this.mapper.scanCodeToText(scancode, keyAction.type);
|
||||
if (this.mapper.hasScancodeIcon(scancode)) {
|
||||
this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode);
|
||||
this.labelType = LabelTypes.SingleIcon;
|
||||
|
||||
@@ -131,7 +131,7 @@ export class SvgKeystrokeKeyComponent implements OnInit, OnChanges {
|
||||
let newLabelSource: string[];
|
||||
if (this.keystrokeAction.hasScancode()) {
|
||||
const scancode: number = this.keystrokeAction.scancode;
|
||||
newLabelSource = this.mapper.scanCodeToText(scancode);
|
||||
newLabelSource = this.mapper.scanCodeToText(scancode, this.keystrokeAction.type);
|
||||
if (newLabelSource) {
|
||||
if (newLabelSource.length === 1) {
|
||||
this.labelSource = newLabelSource[0];
|
||||
|
||||
Reference in New Issue
Block a user