feat: remove Stop/Eject keypress action (#819)

* feat: remove Stop/Eject keypress action

* feat: remove WWW and Launch Web Browser keypress actions
This commit is contained in:
Róbert Kiss
2018-10-08 02:35:48 +02:00
committed by László Monda
parent 6f073ad718
commit 2e2a59ccb8
6 changed files with 7 additions and 43 deletions

View File

@@ -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",

View File

@@ -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();
}
}
}
}

View File

@@ -309,20 +309,17 @@ export class MapperService {
this.basicScanCodeTextMap.set(177, ['000']);
this.mediaScanCodeTextMap = new Map<number, string[]>();
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<number, string>();
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');

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by IcoMoon.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<path fill="#000000" d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 15c-0.984 0-1.92-0.203-2.769-0.57l3.643-4.098c0.081-0.092 0.126-0.21 0.126-0.332v-1.5c0-0.276-0.224-0.5-0.5-0.5-1.765 0-3.628-1.835-3.646-1.854-0.094-0.094-0.221-0.146-0.354-0.146h-2c-0.276 0-0.5 0.224-0.5 0.5v3c0 0.189 0.107 0.363 0.276 0.447l1.724 0.862v2.936c-1.813-1.265-3-3.366-3-5.745 0-1.074 0.242-2.091 0.674-3h1.826c0.133 0 0.26-0.053 0.354-0.146l2-2c0.094-0.094 0.146-0.221 0.146-0.354v-1.21c0.634-0.189 1.305-0.29 2-0.29 1.1 0 2.141 0.254 3.067 0.706-0.065 0.055-0.128 0.112-0.188 0.172-0.567 0.567-0.879 1.32-0.879 2.121s0.312 1.555 0.879 2.121c0.569 0.569 1.332 0.879 2.119 0.879 0.049 0 0.099-0.001 0.149-0.004 0.216 0.809 0.605 2.917-0.131 5.818-0.007 0.027-0.011 0.055-0.013 0.082-1.271 1.298-3.042 2.104-5.002 2.104z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by IcoMoon.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<path fill="#000000" d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 15c-0.984 0-1.92-0.203-2.769-0.57l3.643-4.098c0.081-0.092 0.126-0.21 0.126-0.332v-1.5c0-0.276-0.224-0.5-0.5-0.5-1.765 0-3.628-1.835-3.646-1.854-0.094-0.094-0.221-0.146-0.354-0.146h-2c-0.276 0-0.5 0.224-0.5 0.5v3c0 0.189 0.107 0.363 0.276 0.447l1.724 0.862v2.936c-1.813-1.265-3-3.366-3-5.745 0-1.074 0.242-2.091 0.674-3h1.826c0.133 0 0.26-0.053 0.354-0.146l2-2c0.094-0.094 0.146-0.221 0.146-0.354v-1.21c0.634-0.189 1.305-0.29 2-0.29 1.1 0 2.141 0.254 3.067 0.706-0.065 0.055-0.128 0.112-0.188 0.172-0.567 0.567-0.879 1.32-0.879 2.121s0.312 1.555 0.879 2.121c0.569 0.569 1.332 0.879 2.119 0.879 0.049 0 0.099-0.001 0.149-0.004 0.216 0.809 0.605 2.917-0.131 5.818-0.007 0.027-0.011 0.055-0.013 0.082-1.271 1.298-3.042 2.104-5.002 2.104z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB