Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kiosk-virtual-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kiosk-virtual-keyboard

An electron based virtual keyboard. Uses electron's sendInputEvent api to implement a simple customizable soft keyboard.

  • 1.0.5
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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>

FAQs

Package last updated on 15 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc