Skip to main content

jQuery on Screen Keyboard Plugin

By Sam Deering



Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

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'

Sam Deering has 15+ years of programming and website development experience. He was a website consultant at Console, ABC News, Flight Centre, Sapient Nitro, and the QLD Government and runs a tech blog with over 1 million views per month. Currently, Sam is the Founder of Crypto News, Australia.

New books out now!

Learn valuable skills with a practical introduction to Python programming!

Give yourself more options and write higher quality CSS with CSS Optimization Basics.