Additional media keys with icons (#307)
* Add missing scancodes for media keystrokes * Use icons for media keys * Fix media scancodes.
This commit is contained in:
committed by
László Monda
parent
a8a659dadd
commit
1a456c2ced
@@ -221,8 +221,8 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
if (!keyAction.hasActiveModifier() && keyAction.hasScancode()) {
|
||||
const scancode: number = keyAction.scancode;
|
||||
newLabelSource = this.mapper.scanCodeToText(scancode, keyAction.type);
|
||||
if (this.mapper.hasScancodeIcon(scancode)) {
|
||||
this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode);
|
||||
if (this.mapper.hasScancodeIcon(scancode, keyAction.type)) {
|
||||
this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode, keyAction.type);
|
||||
this.labelType = LabelTypes.SingleIcon;
|
||||
} else if (newLabelSource !== undefined) {
|
||||
if (newLabelSource.length === 1) {
|
||||
|
||||
@@ -141,7 +141,7 @@ export class SvgKeystrokeKeyComponent implements OnInit, OnChanges {
|
||||
this.labelType = 'two-line';
|
||||
}
|
||||
} else {
|
||||
this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode);
|
||||
this.labelSource = this.mapper.scanCodeToSvgImagePath(scancode, this.keystrokeAction.type);
|
||||
this.labelType = 'icon';
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user