Skip to content
Snippets Groups Projects
Commit b239a1e8 authored by jojohoch's avatar jojohoch
Browse files

[player] Use config file for special french characters in keyboard comp.

parent d35daccb
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
class="specialCharacters"> class="specialCharacters">
<button *ngFor="let key of frenchSpecialCharacters; let i = index" <button *ngFor="let key of frenchSpecialCharacters; let i = index"
mat-raised-button mat-raised-button
(click)="enterCharacter(key)"> (click)="enterCharacter(key[0])">
{{shift ? key.toUpperCase() : key}} {{shift ? key[1] : key[0]}}
</button> </button>
</div> </div>
......
...@@ -19,7 +19,9 @@ export class KeyboardComponent { ...@@ -19,7 +19,9 @@ export class KeyboardComponent {
numberKeys: [string, string][] = [['1', '!'], ['2', '"'], ['3', '§'], ['4', '$'], ['5', '%'], ['6', '&'], numberKeys: [string, string][] = [['1', '!'], ['2', '"'], ['3', '§'], ['4', '$'], ['5', '%'], ['6', '&'],
['7', '/'], ['8', '('], ['9', ')'], ['0', '='], ['ß', '?']]; ['7', '/'], ['8', '('], ['9', ')'], ['0', '='], ['ß', '?']];
frenchSpecialCharacters = KeyLayout.get('french').default.flat(); frenchSpecialCharacters: [string, string][] = KeyLayout.get('french').default.flat()
.map( (e, i) => [e, KeyLayout.get('french').shift.flat()[i]]);
enterCharacter(pressedCharacter: string): void { enterCharacter(pressedCharacter: string): void {
this.characterClicked.emit(this.shift ? pressedCharacter.toUpperCase() : pressedCharacter); this.characterClicked.emit(this.shift ? pressedCharacter.toUpperCase() : pressedCharacter);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment