2017 © Pedro Peláez
 

component keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

image

mottie/keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  • Saturday, July 28, 2018
  • by Mottie
  • Repository
  • 88 Watchers
  • 1292 Stars
  • 15 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 543 Forks
  • 63 Open issues
  • 100 Versions
  • 0 % Grown

The README.md

keyboard logoA jQuery on-screen keyboard (OSK) plugin that works in the browser.
, (*1)

Originally posted by Jeremy Satterfield in his blog, jQuery plugins and on Snipplr. Currently maintained by Mottie., (*2)

NPM Version [devDependency Status][david-dev-url] [Join the chat at https://gitter.im/Mottie/Keyboard][gitter] FOSSA Status, (*3)

Features (Demo)

Ease of use

  • An on-screen virtual keyboard embedded within the browser window which will popup when a specified entry field is focused.
  • The user can then type and preview their input before Accepting or Canceling.
  • It can be set to always remain open, and to not use a preview.

Ease of installation

  • Grab the files as a zip, or from npm - see the installation section below.
  • In a minimal setup, the keyboard works by including:
    • jQuery
    • jQuery UI theme
    • (optional) jQuery UI position utility to position the keyboard at the input/textarea element
    • Initialize keyboard - no options needed for qwerty keyboard.

Ease of setup

  • Attach a keyboard to inputs, textareas or contenteditable elements.
  • Add custom keyboard layouts easily.
  • Multiple region specific keyboard layouts included in a separate directory. This is a work in progress and slowly growing.
  • Add up to four standard key sets to each layout that use the shift and alt keys (default, shift, alt and alt-shift).
  • Add any number of optional modifier keys (meta keys) to add more key sets.
  • Each meta key set can also include the shift, alt and alt-shift keysets.
  • Position the keyboard in any location around the element, or target another element on the page (using jQuery UI position utility).
  • Easily modify the key text to any language or symbol.
  • Allow direct input or lock the preview window.
  • Set a maximum length to the inputted content.
  • Scroll through the other key sets using the mouse wheel while hovering over a key to bypass the need to use alt, shift or meta keys.
  • Easily type in characters with diacritics. Here are some default combination examples:
    • ' + vowel ( vowel with acute accent, e.g. ' + e = é )
    • ` + vowel ( vowel with grave accent, e.g., ` + e = è )
    • " + vowel ( vowel with diaresis, e.g., " + e = ë )
    • ^ + vowel ( vowel with circumflex accent, e.g., ^ + e = ê )
    • ~ + certain letters ( letter with tilde, e.g. ~ + n = ñ, ~ + o = õ )
  • Enable, disable or add more diacritic functionality as desired.
  • Use callbacks and event triggers that occur when the keyboard is open or closed and when the content has changed, been accepted or canceled.
  • Includes ARIA support (may not be fully implemented).
  • Built in watermarking. It emulates HTML5's placeholder, if the browser doesn't support it.
  • Include validation using a callback function so third-party validation methods can be used.

Themes

Extensions

  • Alt-keys: Show alternate keys in a popup after long-clicking on a key.
  • Autocomplete: Integrate with jQuery UI's autocomplete widget.
  • Caret: Add a caret with custom styling.
  • Extender: Add a togglable layout (e.g. toggle number pad)
  • Keyset: Show shift, alt or meta keyset within the virtual keyboard - custom styling.
  • Mobile: Use with jQuery Mobile & jQuery Mobile v1.4.
  • Navigate: Use arrow, home, end & page up/down to navigate inside of the keyboard.
  • Scramble: Scramble the entire keyset or by row, once or every time the keyboard is opened for added security.
  • Typing: Allows you to simulate typing into the keyboard for demo purposes or to assist user input.

Dependencies

  • Required
    • jQuery 1.4.3+
    • jQuery caret (included with source)
  • Optional
    • jQuery UI Positioning Utility (optional, if you position the keyboard yourself)
    • jQuery UI CSS (can be customized) / Bootstrap CSS
    • jQuery mousewheel plugin - allows using mousewheel to scroll through other key sets
    • jQuery UI Autocomplete widget - use with jQuery keyboard autocomplete extension

Installation

TypeScript

You can use it with TypeScript. Install TypeScript and @types/virtual-keyboard into dev dependencies for that., (*4)

Documentation

Wiki: Home | FAQ | Setup | Usage | Options ( Layout, Language, Usability, Actions ) | Methods | Theme | Log, (*5)

To Do

  • Add an input mask extension. I think I'll try to make it compatible with this plugin.
  • Allow attaching a keyboard to a contenteditable element. Added v1.27.0.

Known Problems

  • ALL: Only inputs of type "text", "search", "url", "telephone" and "password" support caret positioning (ref). Using this keyboard with any other input type will break the caret left/right, backspace and delete keys (see issue #241 for details).
  • Mobile: If the key press lags behind by one character, it is likely due to the mousewheel plugin. Disable it. See issues #379 & #411.
  • IE and Opera:
    • In a text area with multiple carriage returns, the caret positioning will be off when repositioning it with the mouse.
    • Using the right and left arrow keys to navigate through a text area with multiple carriage returns is problematic. The caret doesn't behave like in other browsers when moving from one line to the next. You can always reposition the caret using the mouse.
  • Opera: When pressing the tab key while inside a textarea, all browsers but Opera add the tab to the virtual keyboard textarea.
  • Safari: See the QWERTY Text Area demo with a locked input. While using the virtual keyboard to type, it enters the text in backwards! This is because textareas with a "readonly" attribute always returns zero for the caret position.
  • Typing Extension:
    • When pressing "Alt", the key set will change to the alt key set, but the focus will be moved to the browser menu. Pressing it quickly a second time will return the focus. This is built into the browser and it isn't possible (as far as I know) to automatically restore the window focus the first time alt is pressed.
    • Holding down the Alt key and trying to type is also not possible since the Windows OS is assuming you are trying to type a shortcut key to access the browser menu. You can still click the keys in the alt key set with the mouse.
    • Simulated typing on the keyboard breaks when the CapsLock is on. Still looking for a cross-browser solution.

Contributing

  • Install node.js - this includes npm (node package manager).
  • Run npm install in the root directory.
  • Run npm install -g grunt-cli to install the grunt command-line interface.
  • Make any changes to the code.
  • Unit tests will be added later.
  • Run grunt to perform a new build in the /dist folder.
  • Submit a pull request from a branch other than the master.

Licensing

  • Keyboard code: MIT License for all versions.
  • Caret code by C. F., Wong (Cloudgen): MIT License
  • Layouts files: Most are under WTFPL, unless the file itself specifies otherwise.

FOSSA Status, (*6)

Change Log

Only the latest changes will be shown below, see the wiki log to view older versions., (*7)

Version 1.30.4 (2022-01-24)

Version 1.30.3 (2021-03-14)

  • Caret: Fix caret positioning in textarea

Version 1.30.2 (2020-05-11)

  • Core
    • Drop input type conversion from number to text.
    • Throw error on non-supported input types. Fixes issue #754 - This is a breaking change since before the library would convert number & email types to a text type input.
    • Fix input type detection. See issue #754.
    • Fix destroyed keyboard detection.
    • Update sign regex based on decimal setting. See issue #771.
  • Layout
    • Updated multiple layouts: Oriya, Tamil, Telugu, Malayalam, Hindi, Kannada, Bengali, Gujarati, Marathi, Nepali, Punjabi & Urdu; all thanks to durga598!
  • Language
  • Docs
    • Fix first layouts demo.

The Versions

28/07 2018

dev-master

9999999-dev https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

28/07 2018

v1.28.5

1.28.5.0 https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

05/07 2018

v1.28.4

1.28.4.0 https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

23/04 2018

v1.28.3

1.28.3.0 https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

19/04 2018

v1.28.2

1.28.2.0 https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

26/03 2018

v1.28.1

1.28.1.0 https://github.com/Mottie/Keyboard

A jQuery on-screen keyboard (OSK) plugin that works in the browser.

  Sources   Download

MIT

The Requires

  • jquery ^1.6.0

 

by Jeremy Satterfield
by Rob Garrison

ui jquery-plugin accessibility customizable keyboard osk

05/03 2018

v1.5.6

1.5.6.0

  Sources   Download

05/03 2018

v1.17.10

1.17.10.0

  Sources   Download

05/03 2018

1.17.8

1.17.8.0

  Sources   Download

05/03 2018

v1.23.1

1.23.1.0

  Sources   Download

05/03 2018

v1.25.17

1.25.17.0

  Sources   Download

05/03 2018

v1.25.5

1.25.5.0

  Sources   Download

05/03 2018

v1.8.12

1.8.12.0

  Sources   Download

05/03 2018

v1.8.9

1.8.9.0

  Sources   Download

05/03 2018

v1.9.20

1.9.20.0

  Sources   Download

05/03 2018

v1.19.0

1.19.0.0

  Sources   Download

05/03 2018

v1.19.1

1.19.1.0

  Sources   Download

05/03 2018

v1.23.0

1.23.0.0

  Sources   Download

05/03 2018

v1.25.16

1.25.16.0

  Sources   Download

05/03 2018

v1.5.5

1.5.5.0

  Sources   Download

05/03 2018

v1.8.11

1.8.11.0

  Sources   Download

05/03 2018

v1.8.8

1.8.8.0

  Sources   Download

05/03 2018

v1.17.1

1.17.1.0

  Sources   Download

05/03 2018

v1.17.7

1.17.7.0

  Sources   Download

05/03 2018

v1.18.9

1.18.9.0

  Sources   Download

05/03 2018

v1.22.6

1.22.6.0

  Sources   Download

05/03 2018

v1.25.4

1.25.4.0

  Sources   Download

05/03 2018

v1.5.4

1.5.4.0

  Sources   Download

05/03 2018

v1.9.2

1.9.2.0

  Sources   Download

05/03 2018

v1.17.0

1.17.0.0

  Sources   Download

05/03 2018

v1.17.6

1.17.6.0

  Sources   Download

05/03 2018

v1.18.8

1.18.8.0

  Sources   Download

05/03 2018

v1.22.5

1.22.5.0

  Sources   Download

05/03 2018

v1.25.14

1.25.14.0

  Sources   Download

05/03 2018

v1.25.15

1.25.15.0

  Sources   Download

05/03 2018

v1.25.3

1.25.3.0

  Sources   Download

05/03 2018

v1.5.3

1.5.3.0

  Sources   Download

05/03 2018

v1.8.1

1.8.1.0

  Sources   Download

05/03 2018

v1.8.10

1.8.10.0

  Sources   Download

05/03 2018

v1.8.6a

1.8.6.0-alpha

  Sources   Download

05/03 2018

v1.8.7

1.8.7.0

  Sources   Download

05/03 2018

v1.9.19

1.9.19.0

  Sources   Download

05/03 2018

v1.16

1.16.0.0

  Sources   Download

05/03 2018

v1.17.5

1.17.5.0

  Sources   Download

05/03 2018

v1.18.7

1.18.7.0

  Sources   Download

05/03 2018

v1.22.4

1.22.4.0

  Sources   Download

05/03 2018

v1.25.13

1.25.13.0

  Sources   Download

05/03 2018

v1.25.28

1.25.28.0

  Sources   Download

05/03 2018

v1.25.29

1.25.29.0

  Sources   Download

05/03 2018

v1.5.2

1.5.2.0

  Sources   Download

05/03 2018

v1.8

1.8.0.0

  Sources   Download

05/03 2018

v1.8.6

1.8.6.0

  Sources   Download

05/03 2018

v1.9.18

1.9.18.0

  Sources   Download

05/03 2018

v1.15

1.15.0.0

  Sources   Download

05/03 2018

v1.17.3

1.17.3.0

  Sources   Download

05/03 2018

v1.17.4

1.17.4.0

  Sources   Download

05/03 2018

v1.18.6

1.18.6.0

  Sources   Download

05/03 2018

v1.22.3

1.22.3.0

  Sources   Download

05/03 2018

v1.25.12

1.25.12.0

  Sources   Download

05/03 2018

v1.25.27

1.25.27.0

  Sources   Download

05/03 2018

v1.5.1

1.5.1.0

  Sources   Download

05/03 2018

v1.7.7

1.7.7.0

  Sources   Download

05/03 2018

v1.8.5

1.8.5.0

  Sources   Download

05/03 2018

v1.9.17

1.9.17.0

  Sources   Download

05/03 2018

v1.14.1

1.14.1.0

  Sources   Download

05/03 2018

v1.17.2

1.17.2.0

  Sources   Download

05/03 2018

v1.18.5

1.18.5.0

  Sources   Download

05/03 2018

v1.22.2

1.22.2.0

  Sources   Download

05/03 2018

v1.5

1.5.0.0

  Sources   Download

05/03 2018

v1.9.16

1.9.16.0

  Sources   Download

05/03 2018

v1.14

1.14.0.0

  Sources   Download

05/03 2018

v1.17.19

1.17.19.0

  Sources   Download

05/03 2018

v1.18.4

1.18.4.0

  Sources   Download

05/03 2018

v1.25.11

1.25.11.0

  Sources   Download

05/03 2018

v1.25.26

1.25.26.0

  Sources   Download

05/03 2018

v1.4.2

1.4.2.0

  Sources   Download

05/03 2018

v1.7.6

1.7.6.0

  Sources   Download

05/03 2018

v1.8.4

1.8.4.0

  Sources   Download

05/03 2018

v1.9.15

1.9.15.0

  Sources   Download

05/03 2018

v1.13

1.13.0.0

  Sources   Download

05/03 2018

v1.17.18

1.17.18.0

  Sources   Download

05/03 2018

v1.22.1

1.22.1.0

  Sources   Download

05/03 2018

v1.25.10

1.25.10.0

  Sources   Download

05/03 2018

v1.25.25

1.25.25.0

  Sources   Download

05/03 2018

v1.7.5

1.7.5.0

  Sources   Download

05/03 2018

v1.8.3

1.8.3.0

  Sources   Download

05/03 2018

v1.9.13

1.9.13.0

  Sources   Download

05/03 2018

v1.9.14

1.9.14.0

  Sources   Download

05/03 2018

v1.12

1.12.0.0

  Sources   Download

05/03 2018

v1.18.3

1.18.3.0

  Sources   Download

05/03 2018

v1.22.0

1.22.0.0

  Sources   Download

05/03 2018

v1.25.1

1.25.1.0

  Sources   Download

05/03 2018

v1.25.24

1.25.24.0

  Sources   Download

05/03 2018

v1.7.4

1.7.4.0

  Sources   Download

05/03 2018

v1.8.2

1.8.2.0

  Sources   Download

05/03 2018

v1.9.9

1.9.9.0

  Sources   Download

05/03 2018

v1.11

1.11.0.0

  Sources   Download

05/03 2018

v1.17.17

1.17.17.0

  Sources   Download

05/03 2018

v1.18.2

1.18.2.0

  Sources   Download

05/03 2018

v1.21.3

1.21.3.0

  Sources   Download