/* VIRTUAL KEYBOARD DEMO - https://github.com/Mottie/Keyboard */
$(function() {
// text that is typed when when pressing the
// keyboard icon (actual code using .typeIn()
// is at the bottom of this code block
var simulateTyping = "Hello World!!1\b <3";
// create a new language (love, awww) by copying the english language
// file. we're doing this just for this demo, so we can add "<3" to the
// combo regex
$.keyboard.language.love = $.extend($.keyboard.language.en);
$('#keyboard').keyboard({
// set this to ISO 639-1 language code to override language set by
// the layout: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// language defaults to ["en"] if not found
language: ['love'],
rtl: false,
// *** choose layout & positioning ***
// choose from 'qwerty', 'alpha',
// 'international', 'dvorak', 'num' or
// 'custom' (to use the customLayout below)
layout: 'qwerty',
customLayout: {
'default': [
'd e f a u l t',
'{meta1} {meta2} {accept} {cancel}'
],
'meta1': [
'm y m e t a 1',
'{meta1} {meta2} {accept} {cancel}'
],
'meta2': [
'M Y M E T A 2',
'{meta1} {meta2} {accept} {cancel}'
]
},
// Used by jQuery UI position utility
position: {
// null = attach to input/textarea;
// use $(sel) to attach elsewhere
of: null,
my: 'center top',
at: 'center top',
// used when "usePreview" is false
at2: 'center bottom'
},
// allow jQuery position utility to reposition the keyboard on
// window resize
reposition: true,
// true: preview added above keyboard;
// false: original input/textarea used
usePreview: true,
// if true, the keyboard will always be visible
alwaysOpen: true,
// give the preview initial focus when the keyboard
// becomes...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.