12

We have an app for an embedded system, and we are developing several apps based on HTML5, CSS3, and some JS libraries, which run on a webkit browser. I was wondering if there are any libraries that implemented on screen keyboard with customizable graphics of keys. It should also be easy to internationalize it.

May be anything based on HTML5 canvas?

I appreciate any input. Thanks!

Sherzod
  • 5,041
  • 10
  • 47
  • 66

3 Answers3

12

Something like this?

http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-keyboard-with-css-and-jquery/

Additionally, here is a (different) plugin instead of a tutorial:

http://www.sitepoint.com/jquery-on-screen-keyboard/

Elazar
  • 20,415
  • 4
  • 46
  • 67
Gregg B
  • 13,139
  • 6
  • 34
  • 50
  • 1
    I like the nettuts one. I saw jquery4u, but I didn't like it because it was based on jquery ui. Do you know any based on html5 canvas? – Sherzod Jan 06 '12 at 18:20
  • This might work: http://stickmanventures.com/labs/demo/onscreen-keyboard-html5-canvas-multitouch/ - more about it here: http://blog.stickmanventures.com/2011/10/22/onscreen-keyboard-implemented-in-html5-canvas-with-multitouch-support-via-touch-events-api-and-magictouch-js/ – Gregg B Jan 06 '12 at 18:23
  • @Grillz Interesting demo, although on my phone under Mobile Firefox it claims "You don't seem to have any multitouch support on the desktop. You need some TUIO"... which is odd since I am not on a desktop device, I am on a multi-touch screen device. – Michael Dec 03 '13 at 18:19
8

You could try the Virtual Keyboard which has a lot of features, language layouts and is very well documented.
You can also easily integrate it with bootstrap:

$('#keyboard').keyboard({
    layout: 'qwerty',
    css: {
        // input & preview
        input: 'form-control input-sm',
        // keyboard container
        container: 'center-block dropdown-menu', // jumbotron
        // default state
        buttonDefault: 'btn btn-default',
        // hovered button
        buttonHover: 'btn-primary',
        // Action keys (e.g. Accept, Cancel, Tab, etc);
        // this replaces "actionClass" option
        buttonAction: 'active',
        // used when disabling the decimal button {dec}
        // when a decimal exists in the input area
        buttonDisabled: 'disabled'
    }
})

Find the full example here.

You could also try the On Screen Keyboard which is a lot simpler and less feature rich.

czerasz
  • 13,682
  • 9
  • 53
  • 63
4

I recommend simple-keyboard. Especially to those looking for a lightweight javascript virtual keyboard without any dependency (jQuery or otherwise) or are interested in a flexbox layout.

You can find the demo here: View Demo

simple-keyboard

Disclosure: I'm the author of the package. Feel free to message here or on Github with any questions or issues you have.

hodgef
  • 1,416
  • 2
  • 19
  • 31
  • 1
    Is it possible to show the keyboard only on focus ?? – Faly Oct 25 '19 at 06:56
  • 1
    Hello @Faly, to achieve that you can initially hide the keyboard with CSS then show it via a focus event listener. Here's an example: https://franciscohodge.com/projects/simple-keyboard/demos/show-hide-demo/ – hodgef Oct 25 '19 at 19:04