Virtual Keyboard
js-dos v8 provides virtual/soft keyboard for mobile devices. This keyboard is highly customizable. You can control it by changing layout and symbols.
Layout
Property softKeyboardLayout configures layout of keyboard, it's an array of string. Each item in that array is a line of keys, e.g.:
Will define the following keyboard:
You also can group buttons in the keyboard with an array of arrays.
Will define the following keyboard:
You can provide multiple layouts and switch between them with special {layout}
button:
The result will be the following:
1st layout | 2nd layout |
---|---|
Symbols
Property softKeyboardSymbols configures how each key will be rendered, it's an array of mapping layout symbols. For example, we can use the same layout for RU and EN keyboards:
The result will be the following:
EN | RU |
---|---|
As you can see, symbols overrides view of keys, you can provide as many symbol maps as you want. They are cycled by pressing special key {symbols}
.
Special keys
The following keys have a special meaning when defined in layout:
| Next layout |
| Next symbols |
| Enter |
| Left Shift |
| Backspace |
| Capslock |
| Tab |
| Space |
| Escape |
| Left Control |
| Left Alt |
| Up Arrow |
| Down Arrow |
| Left Arrow |
| Right Arrow |
| F1 .. F12 keys |
| Keypad keys |
| Page Up |
| Page Down |
| Home |
| End |