diff --git a/packages/uhk-common/src/config-serializer/config-items/scancodes.json b/packages/uhk-common/src/config-serializer/config-items/scancodes.json index a917c42c..87fe4bd0 100644 --- a/packages/uhk-common/src/config-serializer/config-items/scancodes.json +++ b/packages/uhk-common/src/config-serializer/config-items/scancodes.json @@ -454,14 +454,6 @@ "scancode": 182 } }, - { - "id": "132", - "text": "Stop/Eject", - "additional": { - "type": "media", - "scancode": 204 - } - }, { "id": "133", "text": "Play/Pause", @@ -502,14 +494,6 @@ "scancode": 184 } }, - { - "id": "138", - "text": "WWW", - "additional": { - "type": "media", - "scancode": 138 - } - }, { "id": "145", "text": "History Back", @@ -531,14 +515,6 @@ { "text": "Launch application", "children": [ - { - "id": "142", - "text": "Launch Web Browser", - "additional": { - "type": "media", - "scancode": 406 - } - }, { "id": "143", "text": "Launch Email Client", diff --git a/packages/uhk-common/src/config-serializer/config-items/user-configuration.ts b/packages/uhk-common/src/config-serializer/config-items/user-configuration.ts index 0a9f5a2a..46e416a4 100644 --- a/packages/uhk-common/src/config-serializer/config-items/user-configuration.ts +++ b/packages/uhk-common/src/config-serializer/config-items/user-configuration.ts @@ -4,8 +4,9 @@ import { Keymap } from './keymap'; import { Macro } from './macro'; import { ModuleConfiguration } from './module-configuration'; import { ConfigSerializer } from '../config-serializer'; -import { KeystrokeAction } from './key-action'; +import { KeystrokeAction, NoneAction } from './key-action'; import { SecondaryRoleAction } from './secondary-role-action'; +import { isScancodeExists } from './scancode-checker'; export class UserConfiguration { @@ -249,6 +250,10 @@ export class UserConfiguration { keyAction.secondaryRoleAction === SecondaryRoleAction.mouse) { (keyAction as any)._secondaryRoleAction = undefined; } + + if (keyAction.hasScancode() && !isScancodeExists(keyAction.scancode)) { + module.keyActions[keyActionId] = new NoneAction(); + } } } } diff --git a/packages/uhk-web/src/app/services/mapper.service.ts b/packages/uhk-web/src/app/services/mapper.service.ts index 14f5a610..04a9ee10 100644 --- a/packages/uhk-web/src/app/services/mapper.service.ts +++ b/packages/uhk-web/src/app/services/mapper.service.ts @@ -309,20 +309,17 @@ export class MapperService { this.basicScanCodeTextMap.set(177, ['000']); this.mediaScanCodeTextMap = new Map(); - this.mediaScanCodeTextMap.set(138, ['WWW']); this.mediaScanCodeTextMap.set(176, ['Play']); this.mediaScanCodeTextMap.set(177, ['Pause']); this.mediaScanCodeTextMap.set(181, ['Next']); this.mediaScanCodeTextMap.set(182, ['Prev']); this.mediaScanCodeTextMap.set(183, ['Stop']); this.mediaScanCodeTextMap.set(184, ['Eject']); - this.mediaScanCodeTextMap.set(204, ['Eject', 'Stop']); this.mediaScanCodeTextMap.set(205, ['Pause', 'Play']); this.mediaScanCodeTextMap.set(226, ['Mute']); this.mediaScanCodeTextMap.set(233, ['Vol +']); this.mediaScanCodeTextMap.set(234, ['Vol -']); - this.mediaScanCodeTextMap.set(406, ['Launch Web Browser']); this.mediaScanCodeTextMap.set(394, ['Launch Email Client']); this.mediaScanCodeTextMap.set(402, ['Launch Calculator']); @@ -346,7 +343,6 @@ export class MapperService { this.basicScancodeIcons.set(101, 'icon-kbd__mod--menu'); this.mediaScancodeIcons = new Map(); - this.mediaScancodeIcons.set(138, 'icon-kbd__fn--browser'); this.mediaScancodeIcons.set(176, 'icon-kbd__media--play'); this.mediaScancodeIcons.set(177, 'icon-kbd__media--pause'); this.mediaScancodeIcons.set(181, 'icon-kbd__media--next'); @@ -357,7 +353,6 @@ export class MapperService { this.mediaScancodeIcons.set(233, 'icon-kbd__media--vol-up'); this.mediaScancodeIcons.set(234, 'icon-kbd__media--vol-down'); - this.mediaScancodeIcons.set(406, 'icon-kbd__media--web-browser'); this.mediaScancodeIcons.set(394, 'icon-kbd__media--email-client'); this.mediaScancodeIcons.set(402, 'icon-kbd__media--calculator'); diff --git a/packages/uhk-web/src/assets/compiled_sprite.svg b/packages/uhk-web/src/assets/compiled_sprite.svg index c65a0bb8..c05507e2 100644 --- a/packages/uhk-web/src/assets/compiled_sprite.svg +++ b/packages/uhk-web/src/assets/compiled_sprite.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/uhk-web/src/svgs/keyboard/icons/kbd__fn--browser.svg b/packages/uhk-web/src/svgs/keyboard/icons/kbd__fn--browser.svg deleted file mode 100644 index ed8fb75c..00000000 --- a/packages/uhk-web/src/svgs/keyboard/icons/kbd__fn--browser.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/packages/uhk-web/src/svgs/keyboard/icons/kbd__media--web-browser.svg b/packages/uhk-web/src/svgs/keyboard/icons/kbd__media--web-browser.svg deleted file mode 100644 index ed8fb75c..00000000 --- a/packages/uhk-web/src/svgs/keyboard/icons/kbd__media--web-browser.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - -