angular-onscreen-material-keyboard
Version:
This package is forked from ngx-material-keyboard with bug fixes and additional features
1,232 lines (1,224 loc) • 317 kB
JavaScript
import { Subject, BehaviorSubject } from 'rxjs';
import { Component, ChangeDetectionStrategy, NgZone, ChangeDetectorRef, ViewChild, HostBinding, HostListener, InjectionToken, Injectable, Inject, LOCALE_ID, Optional, SkipSelf, EventEmitter, Input, Output, ViewChildren, Directive, ElementRef, Self, Pipe, NgModule } from '@angular/core';
import { LiveAnnouncer } from '@angular/cdk/a11y';
import { OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';
import { first } from 'rxjs/operators';
import { NgControl } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
/**
* Reference to a keyboard dispatched from the keyboard service.
*/
class MatKeyboardRef {
constructor(instance, containerInstance, _overlayRef) {
this._overlayRef = _overlayRef;
/** Subject for notifying the user that the keyboard has closed. */
this._afterClosed = new Subject();
/** Subject for notifying the user that the keyboard has opened and appeared. */
this._afterOpened = new Subject();
// Sets the readonly instance of the keyboard content component.
this.instance = instance;
this.containerInstance = containerInstance;
// Finish dismiss on exitting
containerInstance.onExit.subscribe(() => this._finishDismiss());
}
/** Dismisses the keyboard. */
dismiss() {
if (!this._afterClosed.closed) {
this.containerInstance.exit();
}
}
/** Marks the keyboard as opened */
_open() {
if (!this._afterOpened.closed) {
this._afterOpened.next();
this._afterOpened.complete();
}
}
/** Gets an observable that is notified when the keyboard is finished closing. */
afterDismissed() {
return this._afterClosed.asObservable();
}
/** Gets an observable that is notified when the keyboard has opened and appeared. */
afterOpened() {
return this.containerInstance.onEnter;
}
/** Cleans up the DOM after closing. */
_finishDismiss() {
this._overlayRef.dispose();
this._afterClosed.next();
this._afterClosed.complete();
}
}
// TODO: use real string based enums (available sine typescript 1.4) if
// [tslint](https://github.com/palantir/tslint/issues/2993) and more important
// [rollup](https://github.com/angular/angular/issues/17516) support it
var KeyboardClassKey;
(function (KeyboardClassKey) {
KeyboardClassKey["Alt"] = "Alt";
KeyboardClassKey["AltGr"] = "AltGraph";
KeyboardClassKey["AltLk"] = "AltLk";
KeyboardClassKey["Bksp"] = "Backspace";
KeyboardClassKey["Caps"] = "CapsLock";
KeyboardClassKey["Enter"] = "Enter";
KeyboardClassKey["Shift"] = "Shift";
KeyboardClassKey["Space"] = " ";
KeyboardClassKey["Tab"] = "Tab";
})(KeyboardClassKey || (KeyboardClassKey = {}));
const KEYBOARD_ICONS = {
[KeyboardClassKey.Bksp]: { name: 'keyboard_backspace' },
[KeyboardClassKey.Caps]: { name: 'keyboard_capslock' },
[KeyboardClassKey.Enter]: { name: 'keyboard_return' },
[KeyboardClassKey.Shift]: { name: 'keyboard_arrow_up' },
[KeyboardClassKey.Space]: { name: ' ' },
[KeyboardClassKey.Tab]: { name: 'keyboard_tab' }
};
// this enum index has to be number based because it is used
// to access the keyboard configs alternative key assignment
var KeyboardModifier;
(function (KeyboardModifier) {
KeyboardModifier[KeyboardModifier["None"] = 0] = "None";
KeyboardModifier[KeyboardModifier["Shift"] = 1] = "Shift";
KeyboardModifier[KeyboardModifier["Alt"] = 2] = "Alt";
KeyboardModifier[KeyboardModifier["ShiftAlt"] = 3] = "ShiftAlt";
})(KeyboardModifier || (KeyboardModifier = {}));
var KeyboardAnimationState;
(function (KeyboardAnimationState) {
KeyboardAnimationState["Void"] = "void";
KeyboardAnimationState["Visible"] = "visible";
KeyboardAnimationState["Hidden"] = "hidden";
})(KeyboardAnimationState || (KeyboardAnimationState = {}));
// import { KeyboardAnimationState } from './keyboard-animation-state.enum';
//
// export enum KeyboardAnimationTransition {
// Hide = `${KeyboardAnimationState.Visible} => ${KeyboardAnimationState.Hidden}`,
// Show = `${KeyboardAnimationState.Void} => ${KeyboardAnimationState.Visible}`
// }
var KeyboardAnimationTransition;
(function (KeyboardAnimationTransition) {
KeyboardAnimationTransition["Hide"] = "visible => hidden";
KeyboardAnimationTransition["Show"] = "void => visible";
})(KeyboardAnimationTransition || (KeyboardAnimationTransition = {}));
// TODO: we can't use constants from animation.ts here because you can't use
// a text interpolation in anything that is analyzed statically with ngc (for AoT compile).
const SHOW_ANIMATION = `${AnimationDurations.ENTERING} ${AnimationCurves.DECELERATION_CURVE}`;
const HIDE_ANIMATION = `${AnimationDurations.EXITING} ${AnimationCurves.ACCELERATION_CURVE}`;
/**
* Internal component that wraps user-provided keyboard content.
* @docs-private
*/
class MatKeyboardContainerComponent extends BasePortalOutlet {
constructor(_ngZone, _changeDetectorRef) {
super();
this._ngZone = _ngZone;
this._changeDetectorRef = _changeDetectorRef;
/** Whether the component has been destroyed. */
this._destroyed = false;
/** The state of the keyboard animations. */
this._animationState = KeyboardAnimationState.Void;
/** Subject for notifying that the keyboard has exited from view. */
this.onExit = new Subject();
/** Subject for notifying that the keyboard has finished entering the view. */
this.onEnter = new Subject();
this.attrRole = 'alert';
}
onMousedown(event) {
event.preventDefault();
}
/** Attach a component portal as content to this keyboard container. */
attachComponentPortal(portal) {
if (this._portalOutlet.hasAttached()) {
throw Error('Attempting to attach keyboard content after content is already attached');
}
return this._portalOutlet.attachComponentPortal(portal);
}
// Attach a template portal as content to this keyboard container
attachTemplatePortal() {
throw Error('Not yet implemented');
}
/** Handle end of animations, updating the state of the keyboard. */
onAnimationEnd(event) {
const { fromState, toState } = event;
if ((toState === KeyboardAnimationState.Void && fromState !== KeyboardAnimationState.Void) || toState.startsWith('hidden')) {
this._completeExit();
}
if (toState === KeyboardAnimationState.Visible) {
// Note: we shouldn't use `this` inside the zone callback,
// because it can cause a memory leak.
const onEnter = this.onEnter;
this._ngZone.run(() => {
onEnter.next();
onEnter.complete();
});
}
}
/** Begin animation of keyboard entrance into view. */
enter() {
if (!this._destroyed) {
this._animationState = KeyboardAnimationState.Visible;
this._changeDetectorRef.detectChanges();
}
}
/** Begin animation of the snack bar exiting from view. */
exit() {
this._animationState = KeyboardAnimationState.Hidden;
return this.onExit;
}
/**
* Makes sure the exit callbacks have been invoked when the element is destroyed.
*/
ngOnDestroy() {
this._destroyed = true;
this._completeExit();
}
/**
* Waits for the zone to settle before removing the element. Helps prevent
* errors where we end up removing an element which is in the middle of an animation.
*/
_completeExit() {
this._ngZone.onMicrotaskEmpty
.asObservable()
.pipe(first())
.subscribe(() => {
this.onExit.next();
this.onExit.complete();
});
}
}
MatKeyboardContainerComponent.decorators = [
{ type: Component, args: [{
selector: 'mat-keyboard-container',
template: "<ng-template cdkPortalHost></ng-template>\n",
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
// animations: [
// trigger('state', [
// state('visible', style({transform: 'translateY(0%)'})),
// transition('visible => hidden', animate(HIDE_ANIMATION)),
// transition('void => visible', animate(SHOW_ANIMATION)),
// ])
// ]
animations: [
trigger('state', [
state(`${KeyboardAnimationState.Visible}`, style({ transform: 'translateY(0%)' })),
transition(`${KeyboardAnimationTransition.Hide}`, animate(HIDE_ANIMATION)),
transition(`${KeyboardAnimationTransition.Show}`, animate(SHOW_ANIMATION))
])
],
styles: [":host{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);border-radius:2px;box-sizing:border-box;display:block;margin:0 auto;max-width:960px;min-width:568px;transform:translateY(100%)}.cdk-high-contrast-active :host,.cdk-high-contrast-active :host :host{border:1px solid}"]
},] }
];
MatKeyboardContainerComponent.ctorParameters = () => [
{ type: NgZone },
{ type: ChangeDetectorRef }
];
MatKeyboardContainerComponent.propDecorators = {
_portalOutlet: [{ type: ViewChild, args: [CdkPortalOutlet, { static: true },] }],
_animationState: [{ type: HostBinding, args: ['@state',] }],
attrRole: [{ type: HostBinding, args: ['attr.role',] }],
onMousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }],
onAnimationEnd: [{ type: HostListener, args: ['@state.done', ['$event'],] }]
};
/*
* README from http://www.greywyvern.com/code/javascript/keyboard.js
* ------
*
* - Lay out each keyboard in rows of sub-arrays. Each sub-array
* represents one key.
*
* - Each sub-array consists of four slots described as follows:
* example: ["a", "A", "\u00e1", "\u00c1"]
*
* a) Normal character
* A) Character + Shift/Caps
* \u00e1) Character + Alt/AltGr/AltLk
* \u00c1) Character + Shift/Caps + Alt/AltGr/AltLk
*
* You may include sub-arrays which are fewer than four slots.
* In these cases, the missing slots will be blanked when the
* corresponding modifier key (Shift or AltGr) is pressed.
*
* - If the second slot of a sub-array matches one of the following
* strings:
* "Tab", "Caps", "Shift", "Enter", "Bksp",
* "Alt" OR "AltGr", "AltLk"
* then the function of the key will be the following,
* respectively:
* - Insert a tab
* - Toggle Caps Lock (technically a Shift Lock)
* - Next entered character will be the shifted character
* - Insert a newline (textarea), or close the keyboard
* - Delete the previous character
* - Next entered character will be the alternate character
* - Toggle Alt/AltGr Lock
*
* The first slot of this sub-array will be the text to display
* on the corresponding key. This allows for easy localisation
* of key names.
*
* - Layout dead keys (diacritic + letter) should be added as
* property/value pairs of objects with hash keys equal to the
* diacritic. See the "this.VKI_deadkey" object below the layout
* definitions. In each property/value pair, the value is what
* the diacritic would change the property name to.
*
* - Note that any characters beyond the normal ASCII set should be
* entered in escaped Unicode format. (eg \u00a3 = Pound symbol)
* You can find Unicode values for characters here:
* http://unicode.org/charts/
*
* - To remove a keyboard, just delete it, or comment it out of the
* source code. If you decide to remove the US International
* keyboard layout, make sure you change the default layout
* (this.VKI_kt) above so it references an existing layout.
*
* CREDITS
* -------
*
* See http://www.greywyvern.com/code/javascript/keyboard for examples
* and usage instructions.
*
* Version 1.49 - November 8, 2011
* - Don't display language drop-down if only one keyboard available
*
* See full changelog at:
* http://www.greywyvern.com/code/javascript/keyboard.changelog.txt
*
* Keyboard Credits
* - Yiddish (Yidish Lebt) keyboard layout by Simche Taub (jidysz.net)
* - Urdu Phonetic keyboard layout by Khalid Malik
* - Yiddish keyboard layout by Helmut Wollmersdorfer
* - Khmer keyboard layout by Sovann Heng (km-kh.com)
* - Dari keyboard layout by Saif Fazel
* - Kurdish keyboard layout by Ara Qadir
* - Assamese keyboard layout by Kanchan Gogoi
* - Bulgarian BDS keyboard layout by Milen Georgiev
* - Basic Japanese Hiragana/Katakana keyboard layout by Damjan
* - Ukrainian keyboard layout by Dmitry Nikitin
* - Macedonian keyboard layout by Damjan Dimitrioski
* - Pashto keyboard layout by Ahmad Wali Achakzai (qamosona.com)
* - Armenian Eastern and Western keyboard layouts by Hayastan Project (www.hayastan.co.uk)
* - Pinyin keyboard layout from a collaboration with Lou Winklemann
* - Kazakh keyboard layout by Alex Madyankin
* - Danish keyboard layout by Verner Kjærsgaard
* - Slovak keyboard layout by Daniel Lara (www.learningslovak.com)
* - Belarusian and Serbian Cyrillic keyboard layouts by Evgeniy Titov
* - Bulgarian Phonetic keyboard layout by Samuil Gospodinov
* - Swedish keyboard layout by HÃ¥kan Sandberg
* - Romanian keyboard layout by Aurel
* - Farsi (Persian) keyboard layout by Kaveh Bakhtiyari (www.bakhtiyari.com)
* - Burmese keyboard layout by Cetanapa
* - Bosnian/Croatian/Serbian Latin/Slovenian keyboard layout by Miran Zeljko
* - Hungarian keyboard layout by Antal Sall 'Hiromacu'
* - Arabic keyboard layout by Srinivas Reddy
* - Italian and Spanish (Spain) keyboard layouts by dictionarist.com
* - Lithuanian and Russian keyboard layouts by Ramunas
* - German keyboard layout by QuHno
* - French keyboard layout by Hidden Evil
* - Polish Programmers layout by moose
* - Turkish keyboard layouts by offcu
* - Dutch and US Int'l keyboard layouts by jerone
*
*/
const MAT_KEYBOARD_LAYOUTS = new InjectionToken('keyboard-layouts.config');
const keyboardLayouts = {
'\u0627\u0644\u0639\u0631\u0628\u064a\u0629': {
'name': 'Arabic',
'keys': [
[
['\u0630', '\u0651 '],
['1', '!', '\u00a1', '\u00b9'],
['2', '@', '\u00b2'],
['3', '#', '\u00b3'],
['4', '$', '\u00a4', '\u00a3'],
['5', '%', '\u20ac'],
['6', '^', '\u00bc'],
['7', '&', '\u00bd'],
['8', '*', '\u00be'],
['9', '(', '\u2018'],
['0', ')', '\u2019'],
['-', '_', '\u00a5'],
['=', '+', '\u00d7', '\u00f7'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u0636', '\u064e'],
['\u0635', '\u064b'],
['\u062b', '\u064f'],
['\u0642', '\u064c'],
['\u0641', '\u0644'],
['\u063a', '\u0625'],
['\u0639', '\u2018'],
['\u0647', '\u00f7'],
['\u062e', '\u00d7'],
['\u062d', '\u061b'],
['\u062c', '<'],
['\u062f', '>'],
['\\', '|']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u0634', '\u0650'],
['\u0633', '\u064d'],
['\u064a', ']'],
['\u0628', '['],
['\u0644', '\u0644'],
['\u0627', '\u0623'],
['\u062a', '\u0640'],
['\u0646', '\u060c'],
['\u0645', '/'],
['\u0643', ':'],
['\u0637', '"'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\u0626', '~'],
['\u0621', '\u0652'],
['\u0624', '}'],
['\u0631', '{'],
['\u0644', '\u0644'],
['\u0649', '\u0622'],
['\u0629', '\u2019'],
['\u0648', ','],
['\u0632', '.'],
['\u0638', '\u061f'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.Alt, KeyboardClassKey.Alt, KeyboardClassKey.Alt, KeyboardClassKey.Alt]
]
],
'lang': ['ar']
},
'\u0985\u09b8\u09ae\u09c0\u09df\u09be': {
'name': 'Assamese',
'keys': [
[
['+', '?'],
['\u09E7', '{', '\u09E7'],
['\u09E8', '}', '\u09E8'],
['\u09E9', '\u09CD\u09F0', '\u09E9'],
['\u09EA', '\u09F0\u09CD', '\u09EA'],
['\u09EB', '\u099C\u09CD\u09F0', '\u09EB'],
['\u09EC', '\u0995\u09CD\u09B7', '\u09EC'],
['\u09ED', '\u0995\u09CD\u09F0', '\u09ED'],
['\u09EE', '\u09B6\u09CD\u09F0', '\u09EE'],
['\u09EF', '(', '\u09EF'],
['\u09E6', ')', '\u09E6'],
['-', ''],
['\u09C3', '\u098B', '\u09E2', '\u09E0'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u09CC', '\u0994', '\u09D7'],
['\u09C8', '\u0990'],
['\u09BE', '\u0986'],
['\u09C0', '\u0988', '\u09E3', '\u09E1'],
['\u09C2', '\u098A'],
['\u09F1', '\u09AD'],
['\u09B9', '\u0999'],
['\u0997', '\u0998'],
['\u09A6', '\u09A7'],
['\u099C', '\u099D'],
['\u09A1', '\u09A2', '\u09DC', '\u09DD'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u09CB', '\u0993', '\u09F4', '\u09F5'],
['\u09C7', '\u098F', '\u09F6', '\u09F7'],
['\u09CD', '\u0985', '\u09F8', '\u09F9'],
['\u09BF', '\u0987', '\u09E2', '\u098C'],
['\u09C1', '\u0989'],
['\u09AA', '\u09AB'],
['\u09F0', '', '\u09F0', '\u09F1'],
['\u0995', '\u0996'],
['\u09A4', '\u09A5'],
['\u099A', '\u099B'],
['\u099F', '\u09A0'],
['\u09BC', '\u099E']
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\u09CE', '\u0983'],
['\u0982', '\u0981', '\u09FA'],
['\u09AE', '\u09A3'],
['\u09A8', '\u09F7'],
['\u09AC', '"'],
['\u09B2', '\''],
['\u09B8', '\u09B6'],
[',', '\u09B7'],
['.', ';'],
['\u09AF', '\u09DF'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr]
]
],
'lang': ['as']
},
'\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d\u04b9\u0430': {
'name': 'Azerbaijani Cyrillic',
'keys': [
[
['`', '~'],
['1', '!'],
['2', '"'],
['3', '\u2116'],
['4', ';'],
['5', '%'],
['6', ':'],
['7', '?'],
['8', '*'],
['9', '('],
['0', ')'],
['-', '_'],
['=', '+'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u0458', '\u0408'],
['\u04AF', '\u04AE'],
['\u0443', '\u0423'],
['\u043A', '\u041A'],
['\u0435', '\u0415'],
['\u043D', '\u041D'],
['\u0433', '\u0413'],
['\u0448', '\u0428'],
['\u04BB', '\u04BA'],
['\u0437', '\u0417'],
['\u0445', '\u0425'],
['\u04B9', '\u04B8'],
['\\', '/']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u0444', '\u0424'],
['\u044B', '\u042B'],
['\u0432', '\u0412'],
['\u0430', '\u0410'],
['\u043F', '\u041F'],
['\u0440', '\u0420'],
['\u043E', '\u041E'],
['\u043B', '\u041B'],
['\u0434', '\u0414'],
['\u0436', '\u0416'],
['\u049D', '\u049C'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\\', '|'],
['\u04D9', '\u04D8'],
['\u0447', '\u0427'],
['\u0441', '\u0421'],
['\u043C', '\u041C'],
['\u0438', '\u0418'],
['\u0442', '\u0422'],
['\u0493', '\u0492'],
['\u0431', '\u0411'],
['\u04E9', '\u04E8'],
['.', ','],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space]
]
],
'lang': ['az-CYRL']
},
'Az\u0259rbaycanca': {
'name': 'Azerbaijani Latin',
'keys': [
[
['`', '~'],
['1', '!'],
['2', '"'],
['3', '\u2166'],
['4', ';'],
['5', '%'],
['6', ':'],
['7', '?'],
['8', '*'],
['9', '('],
['0', ')'],
['-', '_'],
['=', '+'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['q', 'Q'],
['\u00FC', '\u00DC'],
['e', 'E'],
['r', 'R'],
['t', 'T'],
['y', 'Y'],
['u', 'U'],
['i', '\u0130'],
['o', 'O'],
['p', 'P'],
['\u00F6', '\u00D6'],
['\u011F', '\u011E'],
['\\', '/']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['a', 'A'],
['s', 'S'],
['d', 'D'],
['f', 'F'],
['g', 'G'],
['h', 'H'],
['j', 'J'],
['k', 'K'],
['l', 'L'],
['\u0131', 'I'],
['\u0259', '\u018F'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['z', 'Z'],
['x', 'X'],
['c', 'C'],
['v', 'V'],
['b', 'B'],
['n', 'N'],
['m', 'M'],
['\u00E7', '\u00C7'],
['\u015F', '\u015E'],
['.', ','],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space]
]
],
'lang': ['az']
},
'\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f': {
'name': 'Belarusian',
'keys': [
[
['\u0451', '\u0401'],
['1', '!'],
['2', '"'],
['3', '\u2116'],
['4', ';'],
['5', '%'],
['6', ':'],
['7', '?'],
['8', '*'],
['9', '('],
['0', ')'],
['-', '_'],
['=', '+'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u0439', '\u0419'],
['\u0446', '\u0426'],
['\u0443', '\u0423'],
['\u043a', '\u041a'],
['\u0435', '\u0415'],
['\u043d', '\u041d'],
['\u0433', '\u0413'],
['\u0448', '\u0428'],
['\u045e', '\u040e'],
['\u0437', '\u0417'],
['\u0445', '\u0425'],
['\'', '\''],
['\\', '/']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u0444', '\u0424'],
['\u044b', '\u042b'],
['\u0432', '\u0412'],
['\u0430', '\u0410'],
['\u043f', '\u041f'],
['\u0440', '\u0420'],
['\u043e', '\u041e'],
['\u043b', '\u041b'],
['\u0434', '\u0414'],
['\u0436', '\u0416'],
['\u044d', '\u042d'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['/', '|'],
['\u044f', '\u042f'],
['\u0447', '\u0427'],
['\u0441', '\u0421'],
['\u043c', '\u041c'],
['\u0456', '\u0406'],
['\u0442', '\u0422'],
['\u044c', '\u042c'],
['\u0431', '\u0411'],
['\u044e', '\u042e'],
['.', ','],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space]
]
],
'lang': ['be']
},
'Belgische / Belge': {
'name': 'Belgian',
'keys': [
[
['\u00b2', '\u00b3'],
['&', '1', '|'],
['\u00e9', '2', '@'],
['"', '3', '#'],
['\'', '4'],
['(', '5'],
['\u00a7', '6', '^'],
['\u00e8', '7'],
['!', '8'],
['\u00e7', '9', '{'],
['\u00e0', '0', '}'],
[')', '\u00b0'],
['-', '_'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['a', 'A'],
['z', 'Z'],
['e', 'E', '\u20ac'],
['r', 'R'],
['t', 'T'],
['y', 'Y'],
['u', 'U'],
['i', 'I'],
['o', 'O'],
['p', 'P'],
['^', '\u00a8', '['],
['$', '*', ']'],
['\u03bc', '\u00a3', '`']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['q', 'Q'],
['s', 'S'],
['d', 'D'],
['f', 'F'],
['g', 'G'],
['h', 'H'],
['j', 'J'],
['k', 'K'],
['l', 'L'],
['m', 'M'],
['\u00f9', '%', '\u00b4'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['<', '>', '\\'],
['w', 'W'],
['x', 'X'],
['c', 'C'],
['v', 'V'],
['b', 'B'],
['n', 'N'],
[',', '?'],
[';', '.'],
[':', '/'],
['=', '+', '~'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr]
]
],
'lang': ['nl-BE', 'fr-BE']
},
'\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0424\u043e\u043d\u0435\u0442\u0438\u0447\u0435\u043d': {
'name': 'Bulgarian Phonetic',
'keys': [
[
['\u0447', '\u0427'],
['1', '!'],
['2', '@'],
['3', '#'],
['4', '$'],
['5', '%'],
['6', '^'],
['7', '&'],
['8', '*'],
['9', '('],
['0', ')'],
['-', '_'],
['=', '+'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u044F', '\u042F'],
['\u0432', '\u0412'],
['\u0435', '\u0415'],
['\u0440', '\u0420'],
['\u0442', '\u0422'],
['\u044A', '\u042A'],
['\u0443', '\u0423'],
['\u0438', '\u0418'],
['\u043E', '\u041E'],
['\u043F', '\u041F'],
['\u0448', '\u0428'],
['\u0449', '\u0429'],
['\u044E', '\u042E']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u0430', '\u0410'],
['\u0441', '\u0421'],
['\u0434', '\u0414'],
['\u0444', '\u0424'],
['\u0433', '\u0413'],
['\u0445', '\u0425'],
['\u0439', '\u0419'],
['\u043A', '\u041A'],
['\u043B', '\u041B'],
[';', ':'],
['\'', '"'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\u0437', '\u0417'],
['\u044C', '\u042C'],
['\u0446', '\u0426'],
['\u0436', '\u0416'],
['\u0431', '\u0411'],
['\u043D', '\u041D'],
['\u043C', '\u041C'],
[',', '<'],
['.', '>'],
['/', '?'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space]
]
],
'lang': ['bg']
},
'\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438': {
'name': 'Bulgarian BDS',
'keys': [
[
['`', '~'],
['1', '!'],
['2', '?'],
['3', '+'],
['4', '"'],
['5', '%'],
['6', '='],
['7', ':'],
['8', '/'],
['9', '_'],
['0', '\u2116'],
['-', '\u0406'],
['=', 'V'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
[',', '\u044b'],
['\u0443', '\u0423'],
['\u0435', '\u0415'],
['\u0438', '\u0418'],
['\u0448', '\u0428'],
['\u0449', '\u0429'],
['\u043a', '\u041a'],
['\u0441', '\u0421'],
['\u0434', '\u0414'],
['\u0437', '\u0417'],
['\u0446', '\u0426'],
[';', '\u00a7'],
['(', ')']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u044c', '\u042c'],
['\u044f', '\u042f'],
['\u0430', '\u0410'],
['\u043e', '\u041e'],
['\u0436', '\u0416'],
['\u0433', '\u0413'],
['\u0442', '\u0422'],
['\u043d', '\u041d'],
['\u0412', '\u0412'],
['\u043c', '\u041c'],
['\u0447', '\u0427'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\u042e', '\u044e'],
['\u0439', '\u0419'],
['\u044a', '\u042a'],
['\u044d', '\u042d'],
['\u0444', '\u0424'],
['\u0445', '\u0425'],
['\u043f', '\u041f'],
['\u0440', '\u0420'],
['\u043b', '\u041b'],
['\u0431', '\u0411'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space]
]
]
},
'\u09ac\u09be\u0982\u09b2\u09be': {
'name': 'Bengali',
'keys': [
[
[''],
['1', '', '\u09E7'],
['2', '', '\u09E8'],
['3', '\u09CD\u09B0', '\u09E9'],
['4', '\u09B0\u09CD', '\u09EA'],
['5', '\u099C\u09CD\u09B0', '\u09EB'],
['6', '\u09A4\u09CD\u09B7', '\u09EC'],
['7', '\u0995\u09CD\u09B0', '\u09ED'],
['8', '\u09B6\u09CD\u09B0', '\u09EE'],
['9', '(', '\u09EF'],
['0', ')', '\u09E6'],
['-', '\u0983'],
['\u09C3', '\u098B', '\u09E2', '\u09E0'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['\u09CC', '\u0994', '\u09D7'],
['\u09C8', '\u0990'],
['\u09BE', '\u0986'],
['\u09C0', '\u0988', '\u09E3', '\u09E1'],
['\u09C2', '\u098A'],
['\u09AC', '\u09AD'],
['\u09B9', '\u0999'],
['\u0997', '\u0998'],
['\u09A6', '\u09A7'],
['\u099C', '\u099D'],
['\u09A1', '\u09A2', '\u09DC', '\u09DD'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['\u09CB', '\u0993', '\u09F4', '\u09F5'],
['\u09C7', '\u098F', '\u09F6', '\u09F7'],
['\u09CD', '\u0985', '\u09F8', '\u09F9'],
['\u09BF', '\u0987', '\u09E2', '\u098C'],
['\u09C1', '\u0989'],
['\u09AA', '\u09AB'],
['\u09B0', '', '\u09F0', '\u09F1'],
['\u0995', '\u0996'],
['\u09A4', '\u09A5'],
['\u099A', '\u099B'],
['\u099F', '\u09A0'],
['\u09BC', '\u099E']
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
[''],
['\u0982', '\u0981', '\u09FA'],
['\u09AE', '\u09A3'],
['\u09A8'],
['\u09AC'],
['\u09B2'],
['\u09B8', '\u09B6'],
[',', '\u09B7'],
['.', '{'],
['\u09AF', '\u09DF'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr]
]
],
'lang': ['bn']
},
'Bosanski': {
'name': 'Bosnian',
'keys': [
[
['\u00B8', '\u00A8'],
['1', '!', '~'],
['2', '"', '\u02C7'],
['3', '#', '^'],
['4', '$', '\u02D8'],
['5', '%', '\u00B0'],
['6', '&', '\u02DB'],
['7', '/', '`'],
['8', '(', '\u02D9'],
['9', ')', '\u00B4'],
['0', '=', '\u02DD'],
['\'', '?', '\u00A8'],
['+', '*', '\u00B8'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['q', 'Q', '\\'],
['w', 'W', '|'],
['e', 'E', '\u20AC'],
['r', 'R'],
['t', 'T'],
['z', 'Z'],
['u', 'U'],
['i', 'I'],
['o', 'O'],
['p', 'P'],
['\u0161', '\u0160', '\u00F7'],
['\u0111', '\u0110', '\u00D7'],
['\u017E', '\u017D', '\u00A4']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['a', 'A'],
['s', 'S'],
['d', 'D'],
['f', 'F', '['],
['g', 'G', ']'],
['h', 'H'],
['j', 'J'],
['k', 'K', '\u0142'],
['l', 'L', '\u0141'],
['\u010D', '\u010C'],
['\u0107', '\u0106', '\u00DF'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['<', '>'],
['y', 'Y'],
['x', 'X'],
['c', 'C'],
['v', 'V', '@'],
['b', 'B', '{'],
['n', 'N', '}'],
['m', 'M', '\u00A7'],
[',', ';', '<'],
['.', ':', '>'],
['-', '_', '\u00A9'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr]
]
],
'lang': ['bs']
},
'Canadienne-fran\u00e7aise': {
'name': 'Canadian French',
'keys': [
[
['#', '|', '\\'],
['1', '!', '\u00B1'],
['2', '"', '@'],
['3', '/', '\u00A3'],
['4', '$', '\u00A2'],
['5', '%', '\u00A4'],
['6', '?', '\u00AC'],
['7', '&', '\u00A6'],
['8', '*', '\u00B2'],
['9', '(', '\u00B3'],
['0', ')', '\u00BC'],
['-', '_', '\u00BD'],
['=', '+', '\u00BE'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['q', 'Q'],
['w', 'W'],
['e', 'E'],
['r', 'R'],
['t', 'T'],
['y', 'Y'],
['u', 'U'],
['i', 'I'],
['o', 'O', '\u00A7'],
['p', 'P', '\u00B6'],
['^', '^', '['],
['\u00B8', '\u00A8', ']'],
['<', '>', '}']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['a', 'A'],
['s', 'S'],
['d', 'D'],
['f', 'F'],
['g', 'G'],
['h', 'H'],
['j', 'J'],
['k', 'K'],
['l', 'L'],
[';', ':', '~'],
['`', '`', '{'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\u00AB', '\u00BB', '\u00B0'],
['z', 'Z'],
['x', 'X'],
['c', 'C'],
['v', 'V'],
['b', 'B'],
['n', 'N'],
['m', 'M', '\u00B5'],
[',', '\'', '\u00AF'],
['.', '.', '\u00AD'],
['\u00E9', '\u00C9', '\u00B4'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr, KeyboardClassKey.AltGr]
]
],
'lang': ['fr-CA']
},
'\u010cesky': {
'name': 'Czech',
'keys': [
[
[';', '\u00b0', '`', '~'],
['+', '1', '!'],
['\u011B', '2', '@'],
['\u0161', '3', '#'],
['\u010D', '4', '$'],
['\u0159', '5', '%'],
['\u017E', '6', '^'],
['\u00FD', '7', '&'],
['\u00E1', '8', '*'],
['\u00ED', '9', '('],
['\u00E9', '0', ')'],
['=', '%', '-', '_'],
['\u00B4', '\u02c7', '=', '+'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['q', 'Q'],
['w', 'W'],
['e', 'E', '\u20AC'],
['r', 'R'],
['t', 'T'],
['y', 'Y'],
['u', 'U'],
['i', 'I'],
['o', 'O'],
['p', 'P'],
['\u00FA', '/', '[', '{'],
[')', '(', ']', '}'],
['\u00A8', '\'', '\\', '|']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['a', 'A'],
['s', 'S'],
['d', 'D'],
['f', 'F'],
['g', 'G'],
['h', 'H'],
['j', 'J'],
['k', 'K'],
['l', 'L'],
['\u016F', '"', ';', ':'],
['\u00A7', '!', '\u00a4', '^'],
[KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter, KeyboardClassKey.Enter]
],
[
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift],
['\\', '|', '', '\u02dd'],
['z', 'Z'],
['x', 'X'],
['c', 'C'],
['v', 'V'],
['b', 'B'],
['n', 'N'],
['m', 'M'],
[',', '?', '<', '\u00d7'],
['.', ':', '>', '\u00f7'],
['-', '_', '/', '?'],
[KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift, KeyboardClassKey.Shift]
],
[
[KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space, KeyboardClassKey.Space],
[KeyboardClassKey.Alt, KeyboardClassKey.Alt, KeyboardClassKey.Alt, KeyboardClassKey.Alt]
]
],
'lang': ['cs']
},
'Dansk': {
'name': 'Danish',
'keys': [
[
['\u00bd', '\u00a7'],
['1', '!'],
['2', '"', '@'],
['3', '#', '\u00a3'],
['4', '\u00a4', '$'],
['5', '%', '\u20ac'],
['6', '&'],
['7', '/', '{'],
['8', '(', '['],
['9', ')', ']'],
['0', '=', '}'],
['+', '?'],
['\u00b4', '`', '|'],
[KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp, KeyboardClassKey.Bksp]
],
[
[KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab, KeyboardClassKey.Tab],
['q', 'Q'],
['w', 'W'],
['e', 'E', '\u20ac'],
['r', 'R'],
['t', 'T'],
['y', 'Y'],
['u', 'U'],
['i', 'I'],
['o', 'O'],
['p', 'P'],
['\u00e5', '\u00c5'],
['\u00a8', '^', '~'],
['\'', '*']
],
[
[KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps, KeyboardClassKey.Caps],
['a', 'A'],
['s', 'S'],
['d', 'D'],
['f', 'F'],
['g', 'G'],
['h', 'H'],
['j', 'J'],
['k', 'K']