Skip to content

linko/jquery.keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery keyboard plugin

This simple plugin makes static keyboard alive! It provides prepared functionality and works with english, russian and symbol keyboards. You a free to add any other language and only you should to do is provide switching among them using already existing mechanism for en-ru Also you can specify your custom display function, for example for outputting a phone number in special format

Usage

$(document).ready(function(){			
  options = {                               
    maxInputLength : 128,            
    displayContainer : '.input .field',
    keySelector : 'span'
  };
  $(".keyboard").keyboard(options);
});	

Options

  • buttonTime - time of key animation. In attached css file I use soft transition
  • keyboardEnContainer, keyboardRuContainer, keyboardSymbolsContainer - keyboard containers with keyboard structure
  • inputFilter - ability to provide a white list of letters/digits/symbols. By default allow all - /[a-zA-Zа-яА-Я0-9()-]/
  • displayContainer - container for output
  • maxInputLength - you can set maximum characters count in the buffer and output container

For control keys you should use individual selectors:

  • keyBackspace - clear on symbol from the end
  • keyClearAll - clear buffer and all symbols in output container
  • keySpaceSelector - selector for spacebar
  • keySwitchKeyboardSymbols - switch from letters keyboard to symbols
  • keySwitchKeyboardLetters - switch from symbols keyboard to letters
  • keyCapsLock - turn on/off CapsLock
  • changeLang - now change language between Russian and English
  • keySelector - this specifies a container, used to wrap a keyboard key( except control keys)

Additionals

Here is a working example with Russian, English and symbols keyboard with all preset settings, html markup and css styles, so you just need to download and open html file in your favorite browser!

About

jQuery plugin and example for screen keyboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published