Media key texts rendering
This commit is contained in:
@@ -577,7 +577,16 @@
|
|||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 232
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 237
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 233
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
@@ -595,7 +604,16 @@
|
|||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 234
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 238
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keyActionType": "keystroke",
|
||||||
|
"scancode": 235
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
@@ -613,19 +631,8 @@
|
|||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "keystroke",
|
||||||
},
|
"scancode": 239
|
||||||
{
|
|
||||||
"keyActionType": "none"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyActionType": "none"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyActionType": "none"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyActionType": "none"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"keyActionType": "none"
|
"keyActionType": "none"
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export class MapperService {
|
|||||||
private nameToFileName: Map<string, string>;
|
private nameToFileName: Map<string, string>;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
this.initScanCodeTextMap();
|
||||||
this.initScanCodeFileName();
|
this.initScanCodeFileName();
|
||||||
this.initNameToFileNames();
|
this.initNameToFileNames();
|
||||||
}
|
}
|
||||||
@@ -113,6 +114,21 @@ export class MapperService {
|
|||||||
return 'build/compiled_sprite.svg#' + this.nameToFileName.get(iconName);
|
return 'build/compiled_sprite.svg#' + this.nameToFileName.get(iconName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private initScanCodeTextMap(): void {
|
||||||
|
this.scanCodeTextMap[232] = ['Play'];
|
||||||
|
this.scanCodeTextMap[233] = ['Stop'];
|
||||||
|
this.scanCodeTextMap[234] = ['Prev'];
|
||||||
|
this.scanCodeTextMap[235] = ['Next'];
|
||||||
|
this.scanCodeTextMap[236] = ['Eject'];
|
||||||
|
this.scanCodeTextMap[237] = ['Vol +'];
|
||||||
|
this.scanCodeTextMap[238] = ['Vol -'];
|
||||||
|
this.scanCodeTextMap[239] = ['Mute'];
|
||||||
|
this.scanCodeTextMap[240] = ['WWW'];
|
||||||
|
this.scanCodeTextMap[241] = ['Bckwrd'];
|
||||||
|
this.scanCodeTextMap[242] = ['Frwrd'];
|
||||||
|
this.scanCodeTextMap[243] = ['Cancel'];
|
||||||
|
}
|
||||||
|
|
||||||
private initScanCodeFileName(): void {
|
private initScanCodeFileName(): void {
|
||||||
this.scanCodeFileName = new Map<number, string>();
|
this.scanCodeFileName = new Map<number, string>();
|
||||||
this.scanCodeFileName[79] = 'icon-kbd__mod--arrow-right';
|
this.scanCodeFileName[79] = 'icon-kbd__mod--arrow-right';
|
||||||
|
|||||||
Reference in New Issue
Block a user