How to use it
import Keyboard from 'rss-virtual-keyboard';
Init keyboard with input element selector and container selector
const kb = new Keyboard().init('.input-field', '.keyboard-container');
Or use HTMLElements
const input = document.createElement('input');
input.type = 'text';
const container = document.createElement('div');
const kb = new Keyboard().init(input, container);
And generate layout and subscribe on events
kb.generateLayout();
kb.on('Enter', () => console.log('Enter button pressed'));
kb.on('Space', () => console.log('Space button pressed'));
Features:
- Two languages: english and russian
- Switch language button
- Ctrl + Alt to change language using keyboard keys