rss-virtual-keyboard

1.0.7 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.70latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.70
1.0.61
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i rss-virtual-keyboard

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

52.4 kB

Total Files

6

Last publish

Collaborators

  • xmelsky