npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rbuljan/kioboard

v1.4.7

Published

Virtual keyboard for digital signage kiosk touch screens

Downloads

80

Readme

JavaScript virtual on-screen keyboard for digital signage kiosk touchscreens

Kioboard

Features

  • [x] Fully customizable layouts and layers
  • [x] Fully customizable buttons actions
  • [x] Fully customizable buttons icons (Unicode, SVG)
  • [x] Themes: default, flat, glass. In light and dark mode
  • [x] Language presets (contribute to the project!)
  • [x] Shift + Caps-Lock
  • [x] Close Kioboard button
  • [x] Toggle or set initial visibility
  • [x] Drag/move Kioboard handler
  • [x] Different layouts per input groups
  • [x] Long key press - repeat input

Usage

Install package

npm i @rbuljan/kioboard

Import and instantiate

import "@rbuljan/kioboard/dist/kioboard.css";
import en from "@rbuljan/kioboard/dist/layouts/en.js";
import Kioboard from "@rbuljan/kioboard";

const kio = new Kioboard({
    layout: en,
    theme: "default-dark",
});

HTML

<input data-kioboard name="example">

Options

Customization options example:

const kio = new Kioboard({
    parent: "body", // selector|Element
    inputs: "[data-kioboard]", // selector|Element|Element[]|NodeList
    input: null, // The curently active input Element
    theme: "default", // "default|flat|glass"-"light|dark"
    layout: {}, // Layout Object, or import en|de|es|fr|hr|it // Contribute for more!
    layerName: "default", // Initial layer
    shiftState: 0, // 0=off 1=on 2=capsLock // Necessary if showing the "shift" layer
    isEnterSubmit: true, // submit form (<input> only)
    isVisible: false, // Initial visibility
    isPermanent: false, // Always visible
    isScroll: true, // should input scrolIntoView()
    isOSK: false, // show also default OS's on-screen keyboard
    scrollOptions: { behavior: "smooth", block: "start", inline: "nearest" },
    onInit() { /*initialized*/ },
    onLoad() { /*layout loaded*/ },
    onBeforeShow() { /*before show*/ },
    onShow() { /*after show*/ },
    onBeforeHide() { /*before hide*/ },
    onHide() { /*after hide*/ },
    onKeyDown(keyName) { /*after key press*/ },
    onKeyUp(keyName) { /*after key release*/ },
});

Methods

Having a Kioboard instance (like i.e: kio), you can then use its methods

kio.load(layout, callback) // Load Layout object or .js layout file
kio.setLayout(layout) // Read layout data, attach keys actions, set default layer
kio.shift(state) // 0=off 1=on 2=caps-lock. Needed when using .show("shift") or .changeLayer("shift")
kio.show() // Show Kioboard
kio.show(layerName) // .changeLayer(layerName) and show Kioboard 
kio.hide() // Kide Kioboard
kio.setActions(actions) // Set key actions for current layout. See: .on()
kio.setStyle(CSSVars) // Sets CSS Vars from object
kio.on(keys, callback) // Attach action callbacks to keys
kio.off(keys, callback) // Detach action callbacks from keys
kio.emit(keys) // Emit programmatically registered keys actions
kio.sequence(keys, speed, callback) // => fn() to stop sequencer
kio.clearKioboard() // Clear children elements (rows and buttons)
kio.draw() // Draw rows and buttons
kio.changeLayer(layerName) // Draw a specific layout's layer
kio.setTheme(themeName) // Change theme
kio.hasSelection() // true if input has selection
kio.insert(value, from, to) // insert a value at caret position of from-to index
kio.drag() // Attaches drag listeners to Kioboard element until pointerup
kio.init() // Initialize element and event listeners
kio.destroy() // Destroy element and listeners

Find out more about each method (with examples!) in the API Docs

Feature requests / issues

Missing a feature? Have a suggestion? Found a bug?

GitHub: rokobuljan/kioboard/issues →

Licence

MIT


© 2024-present — Roko C. Buljan