2.0.0 • Published 5 months ago

kiosk-virtual-keyboard v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Simplest Kiosbrowser Virtual Keyboard

This is javascript virtual keyboard library that uses ipc as inter-communication between client and the browser and webContent's sendInputEvent() function to simulate key event within the browser built on electron

Installation

npm install kiosk-virtual-keyboard

Through yarn

yarn add kiosk-virtual-keyboard

Usage

The keyboard requires passing keys to the main process to mimic key input events. Therefore, you must set your main process to handle these requests

Main Process

Somewhere in you main electron process after you have created your window, pass the webContent object to the VirtualKeyboard class

const { VirtualKeyboardServer } = require('kiosk-virtual-keyboard/virtual-keyboard-server');

let vkb; // keep virtual keyboard reference around to reuse.
function createWindow() {
    /* Your setup code here */

    vkb = new VirtualKeyboardServer(window.webContents);
}

Render Process

Then on your renderer process you can setup any supported element to use the virtual keyboard as follows:

<html>
    <head>
        <link href="node_modules/kiosk-virtual-keyboard/virtual-keyboard-client/virtual-keyboard.css" type="text/css" rel="stylesheet"/>
    </head>
    <body>
        <input type="text" />
        <script>
           import { VirtualKeyboardClient } from 'kiosk-virtual-keyboard/virtual-keyboard-client';
           var keyboard = VirtualKeyboardClient({ lang: 'us-en', mode: 'normal', withNumeric: true });
        </script>
    </body>
</html>
1.0.9

7 months ago

2.0.0

5 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago