1.0.7 • Published 4 years ago

rss-virtual-keyboard v1.0.7

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

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

// Need to be HTMLInputElement or HTMLTextAreaElement
const input = document.createElement('input');
input.type = 'text';

// Any valid HTMLElement as container
const container = document.createElement('div');

const kb = new Keyboard().init(input, container);

And generate layout and subscribe on events

// Then enerate layout to the dom
kb.generateLayout();

// Subscribe to keypress events
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
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago