jQuery on Screen Keyboard Plugin

By Sam Deering

This has moved here: jQuery On-Screen Keyboard


Hi guys, I’ve stumbled across a pretty cool on-screen keyboard plugin which uses jQuery to display a keyboard on screen when the user clicks an input field. It is fully customisable where you can change the layout of keys and the colour scheme. It’s kind of like the windows accessibility keyboard and could be used to enhance the usability of your site.

How to use it.

  1. Download the plugin
  2. Use the demo.js file as a base for creating your keyboard
  3. Tweak the settings to your keyboard layout (see code below)
  4. Customise the CSS code to suit your website

Download Page
Live Demo

jQuery Code

	// standard keyboard layout
	$('.qwerty').keyboard({ layout: 'qwerty' });

	//control for num keys
layout: 'num',
		restrictInput : true, // Prevent keys not in the displayed keyboard from being typed in
		preventPaste : true, // prevent ctrl-v and right click
		autoAccept : true

//code to setup
// Extension demos
$(function() {

	// Set up typing simulator extension on all keyboards


How to load the keyboard from a simple hyperlink

// *** Hidden input example ***
// click on a link - add focus to hidden input
	return false;
// Initialize keyboard script on hidden input
// set "position.of" to the same link as above
layout: 'qwerty',
	position : {
		of : $('.hiddenInput'),
		my : 'center top',
		at : 'center top'



Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.