-
Notifications
You must be signed in to change notification settings - Fork 722
- ...
- 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
- Fix French translation. Closes issue #781
- Docs
- Fix first layouts demo.
- Core:
- Fix focus when keyboard is set as current. Fixes issue #744.
- Core:
- The
display
option for action keys will now allow html (including colons), e.g.<span style="color:red">Panic!</span>
.
- The
- Language:
- Meta:
- Updated Qunit & jQuery migrate.
- Core:
- Update to work with jQuery v3.4+.
- Remove focus binding on destroy.
- Extensions:
- Updated navigation, scramble & typing extensions to work with jQuery 3.4+.
- Docs:
- Update jQuery & UI (using slim & custom jQuery UI).
- Core:
- Prevent overriding modified regex. Only if no language definition regex exists. See issue #731.
- Add
base.isTextArea
&base.isInput
; closes pull #727; thanks @DawidSu
- Language:
- Add untranslated Czech language file. See issue #731.
- Update layouts dist (missing Syriac files).
- Core:
- Replace
substr
withsubstring
. - Ignore colons within HTML; allows adding a style attr to display HTML.
- Replace
- Language/Layout:
- Add Syriac support. See issue #723; thanks @sixtyfive!
- Remove extra
{alt}
in syriac-latin layout.
- Navigation:
- Prevent JS error when keyboard is closed. Fixes issue #724.
- Readme:
- Remove references to bower.
- Add VueVirtualKeyboard link.
- Meta:
- Update dependencies.
- Core:
- Fix JS Error. Closes issue #699.
- Readme:
- Core:
- Fix tab key insertion in textarea.
- Typing:
- Prevent occasional focus error.
- Meta:
- Update dependencies.
- Core:
- Add mousewheel throttle & key check. See issue #665.
- Include enter when restrictInput true; fixes issue #686.
- Reduce rebinding focus delay. See issue #677.
- Meta:
- Add
CHANGELOG.md
file pointing to the wiki pages. See issue #685. - Update dependencies.
- Add
- Scramble:
- Use
crypto.getRandomValues
for scramble. See pull #678; thanks @lsching17!
- Use
- Core:
- Clear opening flag. Fixes issue #668.
- Meta:
- Update dependencies.
- Core:
- Allow urls in display option. See issue #555.
- AltKeys:
- Switch to using
event.key
. Fixes issue #664. - Marked as breaking change (v2.0.0 of the extension) as this will only work in modern browsers.
- Switch to using
- Core:
- Prevent double key action. Fixes issue #659.
- Use hasClass instead of indexOf. Fixes issue #660. See pull #661; Thanks @revgum!
- Meta:
- Remove lock files and update gitignore.
- Update authors list.
- Core:
- An
activeOnReadonly
option to open the keyboard. See issue #653; Thanks @BastienVerschaete! - Combine keyboard checks. See issue #653.
- Fix undefined variable.
- Remove
$allKeys
variable; use delegated binding. See issue #649. - Add
checkValidOnInit
option. Fixes issue #650.
- An
- Docs:
- Update jQuery.
- AltKeys:
- Disable keysets when popup is open. See issue #654.
- Autocomplete:
- Prevent exception with browser autocompletion. See issue #651; Thanks @vkurlyan!
- Meta:
- Update dependencies.
- Update Authors.
- Add rudimentary linting.
- Core: Pass correct clicked target to close event. Fixes issue #639.
- Autocomplete: Add destroy method
- Core: Prevent JS error while checking
closeByClickEvent
. Fixes issue #634. - Meta: Update dependencies.
- Core:
- Prevent JS error on empty contenteditable.
- Fix contenteditable caret position at beginning of line.
- Core:
- Prevent bksp wrap to end. Fixes issue #628.
- Allow using {space} in restrictInclude option. Fixes issue #627.
- Core: Replace references to jQuery with $. Fixes issue #622.
- Readme: Add license scan report and status. See PR #625.
- Core:
- Add missing wrapBR parameter.
- Save caret after inserting a line break. Backspacing on this line break causes other issues that will be addressed later.
- Core:
- Fix caret chaining.
- Save caret position when positioned by dev. See issue #611.
- Save current language to
kb.language
. - Add language and layout data-attribute to wrapper.
- Fix toggle disabled state.
- Fix contenteditable problems:
- Automatically wrap unnested
<br>
s. - Add
wrapBRs
option, set totrue
, to allow disabling the wrapping of breaks; but it is not recommended. - Update caret positioning algorithm to account for
<br>
s and block elements. - Add
$.keyboard.getEditableLength
function to return the calculated content length; accounting for<br>
s and block elements. - The enter action now adds a wrapped
<br>
. - Changed right arrow to move right from the text selection end, instead of start.
- Added a Contenteditable wiki page with more details.
- New line breaks are inserted after the current caret position (see wiki page).
- Automatically wrap unnested
- CSS: Add
white-space: pre;
to keyboard css file for contenteditable elements. - Readme: Add link to Ember version.
- Demo: Add undo and redo actions to Contenteditable layout.
- Core:
- Fix contenteditable inside iframes.
- Clean up caret right action function.
- Preserve caret on sign change. See issue #607.
- Prevent caret function call on non form elements. Fixes issue #607.
- Prevent adding empty strings into acceptedKeys array. Fixes issue #606.
- Meta:
- Remove extra filetypes from bower main entry. Fixes issue #600.
- Core:
- Restore minimum jQuery to v1.4.3. Fixes issue #586.
- Prevent max call stack size error. Fixes issue #542.
- Always return keyboard object.
- Add contenteditable support
- Fixes issues #208 & #540.
- The
usePreview
option has been disabled (for now). - Use the same public API to manipulate contenteditable, textarea and input elements.
- Note: Not all extensions or options have been tested on contenteditable elements. Please report any issues.
- Navigation:
- Misc:
- Navigation:
- Add
rowLooping
option. See pull #576; thanks @bsurai! - When last key in a row is selected, moving up and down now stays on the last key in the row. See pull #583 & issue #581; thanks @bsurai!
- Add
- Clear timer3 timeout on keyboard destroy. See pull #573; thanks @martin-vavra!
- Revert virtual enter navigation commit. Fixes issue #572.
- Core:
- Remove keybindings from preview. Fixes issue #565.
- Resolve issue #549 - Raising keypress by functional keys is Firefox. See pull #550; thanks @Vick-edit!
- Docs:
- Update jQuery.
- Language:
- Add Ethiopic layout and Amharic language. See pull #562; thanks @PietroLiuzzo!
- Update Ethiopic dist files.
- Meta:
- AltKeysPopup: remove old highlight on hover. Fixes issue #556.
- Navigation: properly highlight key on reveal. Fixes issue #557.
- AltKeysPopup: properly close popup when keyboard hides. Fixes issue #553.
- Core:
- keyboard will reposition on keyset change. Fixes issue #547.
- Restore keyup event. Fixes issue #552.
- Fix active meta + shift/alt keys.
- AltKeysPopup:
- Restore keyup event. Fixes issue #552.
- Typing:
- Fix active meta + shift/alt keys.
- Meta:
- Update dependencies.
- Core:
- Prevent max call stack error. Fixes issue #542.
- Docs:
- Update jQuery to v3.2.0.
- Autocomplete:
- Physical keyboard typing works again. Previously, only a mouse move would cause an update.
- Core:
- Prevent JS error if caret doesn't return a function.
- Check event type before opening. Fixes issue #527.
- Prevent JS error if keyaction closes the keyboard. Fixes issue #526.
- Prevent checkCombos error after keyboard closes.
- Docs:
- Stop using protocol relative urls.
- Update wiki links & fix relative urls.
- Create a wiki page for each extension.
- AltKeysPopup:
- Skip
setTimeout
whenholdTime
is zero. Fixes issue #533.
- Skip
- Scramble:
- Add
randomizeInput
option. Fixes issue #522.
- Add
- Typing:
- Code cleanup.
- Fix
showTyping
whenfalse
. - Allow setting
delay
to zero. - Add
hoverDelay
option.
- Meta:
- Update dependencies.
- Core:
- Fix empty
openOn
. See issue #519.
- Fix empty
- Autocomplete:
- Get value from preview or original input. Fixes issue #520.
- Autocomplete:
- Pass value to main element in
usePreview
. Fixes issue #517.
- Pass value to main element in
- Autocomplete:
- Save the correct selected value. Fixes issue #516.
- Prevent stackoverflow of triggered events.
- Core:
- Ensure autoaccept saves last value. Fixes issue #515.
- Autocomplete:
- Save selected value to
last
variable.
- Save selected value to
- Core:
- Add kb.last.keyPress value.
- Fix noFocus being ignored.
- resolve initial focus issue. Fixes issue #482.
- AltKeysPopup:
- Allow reinitialize & add popupPosition callback. Fixes issue #511.
- Core:
-
enterNavigation
include virtual shift to switch input. - Fix click to switch input in IE11. See issue #138.
-
- Core: fix function bypass before keyboard visible.
- This set the initial keyset to display block, shifting the extender layout.
- Toggle button will now properly update.
- Add Burmese language & layout files. See pull #507; thanks @laminko!
- Update Burmese files.
- Add Contributing & license files.
- Core:
- Chained functions stop when keyboard is hidden.
- Add
getKeySet
method. See issue #504.
- Docs:
- Update
typeIn
code for meta demo.
- Update
- Core:
- Meta keyset names no longer require a number. See issue #504.
- Previously meta keyset name examples:
meta0
,meta1
, ...meta99
. - Updated name examples:
meta0
(still allowed),metakeys
,meta_symbols
,meta-greek
. - The name must always start with
meta
followed by any of the following charactersA-Za-z0-9_-
.
- Previously meta keyset name examples:
- Update to allow the following functions to be chained:
checkMaxLength
insertText
redraw
showKeySet
toggle
- The
redraw
function now accepts a layout parameter allowing the changing of the layout:- Previously, you had to get the
keyboard
object, setkeyboard.options.layouts = "new_layout";
then usekeyboard.redraw();
. - Now you can get the
keyboard
object and use the following,keyboard.redraw("new_layout");
.
- Previously, you had to get the
- Add
caret
function:- Previously you had to use
$.keyboard.caret(keyboard.$preview, start, end)
to set the caret position. - In this update, you can get the
keyboard
object, then usekeyboard.caret(start, end)
. - The target input is assumed to the the
keyboard.$preview
(updated to usekeyboard.$el
whenusePreview
isfalse
). - The
start
andend
parameters match the$.keyboard.caret()
function parameters - see docs for more details. - This function is chainable:
keyboard.reveal().caret(4,5).insertText(' hola ').caret('end');
- this method *will require setting theinitialFocus
option tofalse
to prevent issues with the caret position.
- Previously you had to use
- Meta keyset names no longer require a number. See issue #504.
- Typing:
- Update to handle keyset changes with the new meta keyset names.
- Core: prevent form submission on hidden input. Fixes issue #500.
- Core:
- Move caret call before blur prevents jumping. See pull #499; thanks @bastih!
- Prevent default only on locked input. See issue #495 & pull #497; thanks @uNmAnNeR!
- Minor linting update.
- Include select elements in tab navigation. Fixes issue #489.
- Scramble:
- Two different custom layouts now working. See issue #493 & pull #494.
- Docs:
- Update theme switcher.
- Core:
- Revert addition of
preventDefault
in issue #468. - Fix
{empty}
keys inserting a colon.
- Revert addition of
- AltKeysPopup: Do not unbind all events after init. Fixes issue #460.
- CSS:
- Make CSS more readable.
- Prevent multi touch from zooming. See issue #484.
- Fix a few CSS issues introduced in the previous changes. YAY!
- Docs: Update jQuery, jQuery UI & bootstrap.
- Core: Empty buttons do not get the action class.
- Autocomplete: Fix issues with custom widget calling.
- Autocomplete:
- Allow for custom widgets
- Code cleanup.
- Custom widgets have custom events.
- demo.
- Core:
- Add new setting
closeByClickEvent
. See pull #476; thanks @SeeeD! - Core: Include
userClosed
default. - Docs: Switch to using
"normal"
instead of"default"
.
- Core:
- Add
autoAcceptOnValid
with virtual typing. - Prevent JS error when
usePreview
isfalse
. - Add
beforeInsert
callback method. - Add
event.preventDefault
after focusing on input. See #468.
- Add
- Readme: Update demo links.
- Docs: Update jQuery (v3.1.0).
- Misc:
- Add
composer.json
; See issue #466. - Fix caps in
composer.json
.
- Add
- Core:
- Prevent JS error if keyboard closes before "keyup".
- Add
autoAcceptOnValid
option.
- Readme: Add link to react.js component.
- Testing: Update to jQuery 3.0.0-rc1; update migrate.
- Readme: Add link to gemfile. Thanks to scicasoft for creating it!
- Docs: Update jQuery & add migrate for v3.0. Not using jQuery v3.0 yet due to limitations with Bootstrap.
- Core: Only trigger named events. Fixes issue #463.
- Core:
- Set position fixed on test element to prevent scrolling.
- Click/touchstart correctly switches to
alwaysOpen
keyboards. Fixes issue #448. - Correct stickyShift behavior. Fixes issue #452 & reverts
663b86d
.
- Misc:
- Update dependencies.
- Update qunit.
- Update jQuery.
- Extender: Do not remove extender toggle button!
- Update dependencies.
- Remove keyboard data from preview when
usePrevies
istrue
. Fixes issue #442.
- HTML is now allowed in display settings. Fixes issue #440.
- Retain input value on
alwaysOpen
hover; See issue #430. - Add
redraw
method.- Extracted from
reveal
method, so usingreveal(true)
no longer works as expected. - See the documentation on the
redraw
method.
- Extracted from
- Caret: Adjust calculation when
textAlign:center
set; fixes issue #436.
- Files are now available through CDNJS! Fixes issue #434.
- Fix theme switcher styling.
- Fix reference to destroyed base. See pull #435; thanks @akiraspeirs!
- Update dependencies.
- Fix null reference when toggling keyboards quickly. See pull #433; thanks @akiraspeirs!
- Update dependencies & distribution files.
- Prevent repeater event if key is disabled. See issue #431.
- Use different namespace for callbacks. Fixes issue #432.
- Fix version numbers in readme & wiki... version is at 1.25, not 1.26.
- Core:
- Add
userClosed
option. See issue #415. - Add remove keyboard function & prevent memory leaks.
- Reformat code.
- Add
- Scramble: Scramble once with multiple always open keyboards. Fixes issue #430.
- Add npm autoupdate data for cdnjs & version bump.
- Core:
- Fix action key class names - bug introduced in last update.
- Triggered change events now use a modified keyboard event.
- The lock (caps lock) key now "sticks" properly.
- Call validate with empty input. Fixes issue #429.
- Build: update dependencies.
- Docs:
- Update jQuery & migrate plugin.
- Add jQuery v3.0.0-beta1 to test.
- Core:
- Fix ":" mapping & change key data-action values. Fixes issue #425.
- Dash & underscore keys get a class name assigned.
- Typing:
- Include arrow & other keys.
- Fix issue where "." was not highlighted while typing.
- Core:
- Tweak capslock detection code. See issue #416.
-
restrictInput
matches accepted keys instead of replacing. Fixes issue #419. - Fixed mapped & accepted keys.
- Add
last.preVal
which stores the previous value.
- AltKeysPopup:
- Fix javascript error.
- Prevent javascript error if altKey is undefined.
- Tweak capslock detection code.
- Prevent opening multiple popups.
- Fix key highlighting on keyboard navigation.
- Ensure all popup windows removed.
- See issue #416.
- Typing: Fix mapped key highlighting while typing.
- Build: Include unminified keyboard file in dist folder. See issue #422.
- Bower: Add development (non-minified) keyboard script. See issue #418.
- Core:
- Use correct event names while binding callback options.
- Make internal close function public.
- AltKeysPopup:
- Compare altkeys to key data-value. See issue #416.
- Add physical keyboard long hold & popup navigation. See issue #416.
- Themes:
- Add missing definitions to custom themes.
- Add minified custom themes.
- Keep keyboard centered while resizing textarea.
- Core:
- Prevent
beforeVisible
&visible
events whenalwaysOpen
istrue
. - Save caret immediately before changing focus.
- Keyboard now works with
readonly
set on input prior to initialization. - Move duplicate
touchstart
code to prevent lag on Mobile devices. Fixes issues #379 & #411. - Consolidate keyCodes to make the code more readable.
- Prevent
- Extensions: update extensions to prevent duplicates. In case
alwaysOpen
istrue
&beforeVisible
orvisible
events fire. - Miscellaneous:
- Main demo cleanup.
- Add "main" to
package.json
. Fixes issue #414. - Add & adjust Gitter badge to readme. Fixes issue #413.
- Readme: Update & elaborate. Fixes issue #410.
- Themes: Update custom basic (white) & add dark theme.
- Core:
- Update state of combo & accept keys in their title.
- Added
display
options forvalid
,invalid
,active
anddisabled
to allow language specific changes. - Make keysets display
inline-block
; remove all css floats.
- Extender:
- Update default display value before initialization.
- Make extender layout display
inline-block
.
- Docs: update Bootstrap to v3.3.6.
- Grunt: Fix uglify to only preserve comments that start with a bang.
- Add endrow break after spaces. Fixes issue #402.
- Remove extraneous preview data-attributes. Fixes issue #351.
- Grunt:
- Update dependencies.
- Add rudimentary unit testing.
- Destroy: remove isCurrent class.
- Readme: Add link to ng-virtual-keyboard for Angular JS.
-
alwaysOpen
changes:- Do not redefine stored preview object when alwaysOpen.
-
alwaysOpen
keyboards are now activated without using focus. Fixes issue #395.
- Restricted input compare to string. Fixes issue #399.
- Add
restrictInclude
option & update hex demo. - Do not include space with enter unless using old IE.
- Mousewheel tweak, possible fix for issue #379.
- Clear clone variable on keyboard close. Fixes issue #397 & pull #398.
-
openOn
option now allows multiple events.
- Caret: Fix caret when currently focused keyboard is refocused with no preview window. See pull #394, thanks @isfs!
- Grunt: update dependencies, again.
- Grunt: update dependencies.
- Core:
-
resetDefault
option now behaves properly; set default totrue
. Fixes issue #387. - Active meta keys get a
css.buttonActive
class name, again
-
- Typing: Update for modified
data-action
from v1.24.0. Fixes issue #391.
- Caret extension:
- Use jQuery
position()
method instead of DOM offset. Merged in pull #383, thanks @isfs! - Prevent javascript error while using physical keyboard tab. Fixes issue #385.
- Use jQuery
- Caret extension:
- Include
null
when usinggetComputedStyle
to prevent errors in older browsers. Fixes issue #384.
- Include
-
Change
package.json
to use the new spdx license expression syntax. -
Core
-
Add keyboard data to the preview input & keyboard, so using any of these methods will return the keyboard object:
// original method var keyboard = $('input').data('keyboard'); // find currently focused keyboard & get keyboard object from it var keyboard = $('.ui-keyboard-has-focus').data('keyboard'); // find currently focused keyboard preview input (only works if usePreview is true) var keyboard = $('.ui-keyboard-has-focus .ui-keyboard-preview').data('keyboard');
Thanks to @isfs for these additions!
-
-
Autocomplete: correctly position autocomplete popup on subsequent keyboard openings. Fixes issue #382.
- Core
- Don't stop repeating when touch moves within the same key.
- Add
noFocus
option to avoid focusing the input; use with caution for old IE! - Ensure
lockInput
is effective when toggling. - Add
ignoreEsc
option to prevent escape from closing the keyboard. - See pull #377; thanks @isfs for all the above changes!
- Some more tweaks to the above code.
- Add
popup
css option (in addition tocontainer
css option; they both add to the same element) to allow for adding theme class names more easily. - Adjust css to include "ui-keyboard-dark-theme" to use brighter icons.
- Fix
 
(a.k.a.
) to prevent it from showing up in the space bar.
- Caret extension
- Theme
- Add a basic white, non-library (not jQuery UI or Bootstrap) theme
- This theme is to be used when neither jQuery UI css nor position utility is used as it positions the keyboard at the bottom of the browser windows using css.
- See the demo here.
- Caret extension:
- Use protocol-relative urls
- Add font-awesome to repository. Removes initial delay in page rendering.
-
Clear key now enables
{dec}
key. See issue #370. -
Add processName function
-
Previously, if a
t
andtest
button were added to a layout'normal' : [ 't test st\u03b1\u03b2\u03bexyz' ]
both keys would end up with a class name of
ui-keyboard-t
, because only the first letter was used. -
The
processName
function now includes all characters, so the class name for thetest
button would becomeui-keyboard-test
. -
If there are any non-alphanumeric characters, the character code for each symbol would be used instead. So a
stαβξxyz
button would have a class name ofui-keyboard-st-945-946-958xyz
(notice that there is not a-
between the958
andxyz
, this is because alphanumeric characters don't get a-
added in front. -
Dashes are left in as-is (e.g.
test-xx
stays astest-xx
, ortest-αβ
becomestest-945-946
). -
Underscores are left as-is when followed by an alphanumeric character (e.g.
test_xx
stays astest_xx
). When followed by a non-alphanumeric character, the underscore is followed by a dash, then the decimal ascii value of the character (e.g.test_\u03b1\u03b2
becomestest_-945-946
). -
The result is this processed name is added after the virtual key prefix contained in
$.keyboard.css.keyPrefix
(default isui-keyboard-
). So a key named "test-αβ" in the layout will have a class name ofui-keyboard-text-945-946
. -
The result of this function is saved to the virtual key's
data-name
attribute.
-
-
The
data-name
attribute replaces thename
attribute on buttons-
data-name
contains the suffix of the virtual button class name (e.g.text-945-946
from the last example) - Modified
showSet
function to allow passing the keyset name instead of the key element (which looked forel.name
)
-
-
The
lockInput
option now blocks backspace, enter, capslock and pasting from the physical keyboard. -
Mapped keys
- Now work correctly without the mousewheel plugin. Fixes issue #373.
- The mapped character will be now be run through the processName function and used in the virtual key class name
-
Add
buildKey
callback function: it allows the modification of the text of the virtual key, like add line breaks or modify the HTML. -
Add
useWheel
option:- Setting this option to
true
(default) allows using the mousewheel while hovering over a virtual key to show key content from other keyset layers. - Setting it as
false
will now limit the amount of processing that occurs while hovering over a virtual key.
- Setting this option to
-
Add callback function to the
destroy
function// no parameters $('input')data('keyboard').destroy(function(){ alert('keyboard destroyed'); });
-
Add
layout
parameter tocustomHash
function as a start to adding QUnit testing.
-
Add zero-width keys & non-breaking space as action keys:
-
{NBSP}
- non-breaking space. -
{ZWNJ}
- zero-width non-joiner. -
{ZWJ}
- zero-width joiner. -
{LRM}
- left-to-right mark. -
{RLM}
- right-to-left mark.
-
-
keyaction
definitions can now be set as a string instead of a function. The following two functions are equivalent:// new method $.keyboard.keyaction.kirby = '<('-'<) ^('-')^ (>'-')>'; // original/alternative method $.keyboard.keyaction.kirby = function( base ) { base.insertText('<('-'<) ^('-')^ (>'-')>'); }
- Use
$.keyboard.caret(#)
where#
sets the start & end of the caret (no text is selected). - Use
$.keyboard.caret('start')
or$.keyboard.caret(0)
to move the caret to the beginning. - Use
$.keyboard.caret('end')
(or, really any string that isn't'start'
) to move the caret to the end.
- Languages: Add native & English name to language value.
- Update typing extension to use meta keys properly; since the
name
attribute is no longer used.
- Autocomplete: add autocomplete menu position options.
- Language: add Spanish translations; pull #368. Thanks adrianfish!
- Destroy method removes extension bindings. Fixes issue #366.
- Fix javascript error when no options set. See issue #366.
- Core:
- Stop document events from opening the keyboard. Fixes issue #365.
- Fix
create
callback function; mobile 1.4 demo works again. - Simplified the use of
keyboard.showKeySet()
method (ref). - Extend
position
options separately. Fixes issue #357.
- Language: add German language file. Thanks C. Pape!
- Autocomplete: minor cleanup.
- Caret: Add new caret extension (beta) which adds a stylable caret to the keyboard.
- Navigation: fix caret positioning keys.
- Docs:
- Update bootstrap.
- Added top navigation.
- Prevent js error if destroyed in "hidden" callback. See issue #358.
- Stop focusOn execution while typing on physical keyboard.
- Navigation extension
-
navigateTo
now accepts[0,0]
properly. Fixes issue #361. - "ui-state-hover" class now applied when switching key sets. Fixes issue #362.
- Thanks to gkubisa for pull #363.
-
- Core:
- Fix caps lock detection.
- Fix hidden input overflow on page.
- Fix caret jumping to end while inserting text.
- Update XHTML compatibility. Pull #354, thanks ptwz!
- Add russian language translations. Pull #356, thanks https://github.com/ihsoft!
- Language definitions
- Removed language definitions from layout files.
- Add
languages
folder with files named using the ISO 639 language code. See issue #355. - Existing language definitions without a translation were moved to files with "untranslated" in the file name, e.g.
"mn.untranslated.js"
. - Language definition readme added.
- Language files (not "untranslated" files) are now included in:
- "layouts/keyboard-layouts-combined.js"
- "layouts/keyboard-layouts-microsoft.js"
- "dist/layouts/keyboard-layouts-combined.min.js"
- "dist/layouts/keyboard-layouts-greywyvern.min.js"
- "dist/layouts/keyboard-layouts-microsoft.min.js"
- Fixed grunt build issues. Pull #350, thanks abovethewater!
- Fixed missing tag terminator. Now XHTML compatible. Pull #353, thanks ptwz!
- Backspace now properly removes all characters. Fixes issue #352.
- Caret
- Include code inside of keyboard AMD wrapper.
- Remove need for document ready to check for caret support.
- Fixes issue #348.
- Remove id from preview clone. See issue #334.
- Core: move build row code into a separate function (so the new extension can use it).
- AltKeyPopup extension: show alternate keys popup after clicking/pressing and holding on set keys. Fixes issue #346.
- Bug fix undefined error, if destroy is called before times have fired. Pull #345, thanks raido!
- Destroy method now clears timers.
- Caret position on open &
caretToEnd
working. Fixes issues #343 & #262. - Disabled button now maintain default appearance (rounded corners were disappearing).
- Core
- Add
setScroll
function to accurately set the scroll position so the caret is visible. Fixes issue #23. - Add element id to keyboard +
$.keyboard.css.idSuffix
to allow specific keyboard styling with css.
- Add
- Docs: Update to jQuery v1.11.2.
- Extender: Wrap with UMD code.
- Preview Keyset: Now works when
alwaysOpen
istrue
. - Scramble: Fix javascript error preventing keyboard from appearing ( broken in v1.21.2 :/ ).
- Typing: Trigger "keyboardChange" event while simulating typing.
- Misc: Remove byte-order mark from
package.json
. Thanks kant312!
- Core
- Update
keyboard.last.eventTime
on keyboard visible. - Destroy method now removes all references. Fixes issue #337.
- Close function is now called when
stayOpen
istrue
and clicking to open another keyboard.
- Update
- Docs
- Update password demo to close on second click. Fixes issue #336.
- Update to use jQuery UI v1.11.4.
- Typing Extension
- Stop typing simulation on user interaction.
- Add new and additional typeIn support for simulated keys:
- caret left =
{l}
- caret right =
{r}
- delete =
{d}
(\\d
removed) - tab =
\t
or{t}
- backspace =
\b
or{b}
- enter =
\n
or\r
or{e}
- caret left =
- Find virtual key using
data-action
attribute as it's value doesn't change with other languages. - Use keyaction functions instead of just inserting the text.
- Add AMD/browserify support.
- Add
{del}
key & modify{bksp}
key.- The delete key allows deleting content to the right of the caret.
- The backspace key still allows deleting content to the left of the caret, it's code was only tweaked internally to not use plain text to indicate a backspace.
- Add
{normal}
key & deprecate{default}
key:- The
{normal}
key is a duplicate of the{default}
key. - Since "default" is a reserved javascript word, this key is being deprecated to prevent future issues.
- The
-
last
variable changes:- Rename
last.value
tolast.val
- it was inconsistent internally. This contains the current preview input value. - Add
last.event
- contains last DOM event object; saved bykeypress
,repeater
and events set by thekeyBinding
option. - Add
last.$key
- jQuery object of the last virtual key used; it is set to an empty array when the physical keyboard is used. - Add
last.layout
- contains the name of the layout last used by the keyboard. - Update
last.eventTime
upon closing the keyboard. See issue #333 on how this can be useful.
- Rename
- Remove internal keyboard position setting
- Absolute positioning is already defined in the css
- The inline setting was interfering with alternative positioning.
- Caret
- Started centralizing caret positioning code.
- Anticipating the possibility of swapping out caret positioning plugins, or using an input mask plugin.
- A suitable alternatives has yet to be found; either way, more code adjustment will be necessary to make this work.
- Set caret position to end when caret positioning isn't supported; it was previously returning a full selection.
- Demo
- Add jQuery UI theme switcher to the combined layouts demo.
- Also added some missing layouts to the combined layouts demo.
- Grunt build
- Add a "grunt layout" build to build everything.
- The default "grunt" build now ignores layout files as uglifying & concatenating layout files takes more time.
- Add Extender extension.
- It allows toggling an extra layout (e.g. numpad) next to the keysets (demo).
- Any layout can be used, but only the "normal" (previously "default") keyset will be visible.
- See the documentation for more details.
- Add 93 more layouts.
- All generated from Microsoft Windows Keyboard Layouts.
- Demo provided.
- Toggle action key icon css tweaks
- Core:
- Add save caret position function - used to save caret position, especially after the visible event. Fixes issue #331.
- General code cleanup.
- Extender extension
- Added to allow toggling an extra layout.
- The main example allows toggling of a 'numpad' (new layout with extension).
- Any layout can be used, but only the "normal" keyset will be added.
- See the demo here.
- The documentation can be found here.
- Add toggle action key
- Allows enabling or disabling all keyboard keys & preview input.
- Button uses base64 encoded svgs for its icon (included in the css/images directory).
- Fulfills issue #281.
- Autocomplete: Fix event error & caret repositioning issue.
- Removed namespacing requirements from all event bindings POSSIBLE BREAKING CHANGE
- When binding to events, the
.keyboard
is no longer a requirement namespace as keyboard events are now contained with the$.keyboard.events
variable. - See the updated Methods wiki page for more details.
- When binding to events, the
- Moved various checks outside of instanced keyboards. This includes:
- Check for older version of IE.
- Watermark support.
- Caret positioning being saved when input is hidden or loses focus. This fixes issue #327.
- Add
autoAcceptOnEsc
option:- Setting this to
true
will only work if theautoAccept
option istrue
. - Allows forcing the content to be accepted even if the user presses escape.
- Fixes issue #314.
- Setting this to
- Changed
language
option:- It can now be set as either a string (
"en"
) or an array (["en"]
). - As an array, it will allow for future expansion so that a multiple languages can be set for one layout.
- It can now be set as either a string (
- Changed
position
option:- It can now be set as
false
or even an empty string. - Previously, to avoid using the jQuery UI position utility this option was supposed to be set to an empty object (
{}
); but internal scripting was continuing to update and use this option to activate the jQuery UI position utility. No more!
- It can now be set as
- Fixed an issue with meta keys getting broken by the v1.20.0 update. Sorry!
- Build
- Add build process.
- Rename "all.js" to "keyboard-layouts-greywyvern.js"
- Combine all other layouts into a "keyboard-layouts-combined.js" file.
- Combine all extensions into "jquery.keyboard.extension-all.js" file.
- Create a minimized version of all files (css & js) in a 'dist' folder.
- Removed all
.min.js
files from thejs
folder; this might break some external demos.
- Core
- Add "keysetChange" event; fired when the visible keyset changes.
- Moved internal class names to
$.keyboard.css
. - Moved internal event names to
$.keyboard.events
. - Perform max length check before validating.
- Docs
- Add jQuery & jQuery UI files.
- Replace tooltip plugin.
- Add keyboard svg icon.
- Layout demo now uses combined layouts file instead of loading each layout separately.
- Navigation demo now includes external caret navigation buttons that work without the toggle engaged.
- Mobile
- Fix mobile css styles.
- Fix issues with mobile theming.
- Navigate
- Fixed broken extension code.
- Add navigation functions that work in untoggle mode.
- Preview Keyset
- Add new preview keyset extension.
- Choose which keysets to preview & use pure css to display it.
- Core: correct problem with typed characters (introduced in 1.19.2). Fixes issue #324.
- Typing extension: Fix issue with callback being called repeatedly.
- Core
- Update keyboard languages before building.
- Reset active keysets when switching layouts.
- Restore contents of preview when swapping layouts.
- Fix clicking on mousewheel altered keys; empty keys are now ignored.
- Layouts
- Fix mislabeled languages.
- Make corrections to Hindi layout. See issue #323.
- Add Persian (Farsi) layout. Thanks to Majid R via email.
- Add layouts generated & modified from the greywyvern virtual keyboard.
- Num layout now uses
{dec}
instead of a decimal point. Fixes issue #318. - Save original settings, so scramble extension works properly. Fixes issue #276.
-
Core
- Check for jQuery UI before checking for the position utility. Fixes issue #263.
- Add
maxInsert
option; whentrue
it allows inserting characters at the caret when the max length is set. Fixes issue #289. - Fix tab navigation when
openOn
option is empty. Fixes issue #275. - Allow inline renaming of action keys; it works the same as the other non-action keys
- Remove mousewheel scrolling through keyset text for action keys
- Build will now ignore layout keys
name
,lang
andrtl
. - Add
restricted
callback function. Fixes issue #305. - Add
reposition
option to automatically reposition the keyboard on window resize. - Modified
reposition
option to ignore repositioning when the keyboard is not attached to the page 'body'. See pull request #317. Thanks eugenius! - The
change
callback no longer keeps the last keyboard open. Fixes issue #311 and issue #308. - Ensure preview variable is updated & keyboard is positioned properly when
usePreview
isfalse
. - Switching inputs (tab/enter navigation) now ignores disabled elements.
- Page no longer scrolls in Firefox upon initialization. Fixes issue #213.
- Fix initial positioning when
usePreview
isfalse
.
-
Caret
- Fix js error when using email/number inputs. Fixes issue #309.
- Caret detect
selectionStart
in Firefox using alternate method. Fixes issue #311. - Caret position can again be set to zero. Fixes issue #315.
-
Demo
- Fix Colemak demo; contenteditable not yet supported.
- Changed International demo to use a Bootstrap theme.
- Changed syntax highlighting script to prettify.
-
Layouts
- Updated all layouts to include an internal language definition.
- The language used in virtual keyboard keys now automatically switches to the layout set language; this can be overridden by the core
language
setting. - Updated Russian layout. Thanks to James Newton via email.
- Add Serbian layout. Thanks to James Newton via email.
- Add an example template file (
_template.js
) for use as a starting template to add more language layouts.
-
Extensions
- Autocomplete extension: now works with jQuery v2.1+. Fixes issue #291.
- Typing extension: add
lockTypeIn
option & fix javascript error while user types. - Scramble extension: Keyboard no longer disappears when scramble initializes more than once. Fixes issue #283.
- Added an internal version number. Access it as follows:
$('#keyboard').data('keyboard').version
- Updated mousewheel plugin & made code backwards compatible.
- Added
byKeySet
to scramble extension to allow scrambling of just one keyset, then making all other keysets match it. Fixes issue #288.
- Scramble extension no longer breaks layout when initialized twice. Fixes issue #283.
- Add Romanian keyboard layout. Thanks to aflorea for all the work! See pull request #285.
- Number type inputs do not support caret positioning, so the preview input (only) will now switch to a text type input. Fixes issue #241.
- Removed "aria-haspopup" from the preview clone.
- Update hash code; removed slower reduce method.
- Change keyboard collision fallback to "flipfit flipfit".
- Caret: prevent errors when input doesn't support caret positioning.
- Fix js error when base.$keyboard is removed.
- Scramble: now applied when keyboard is alwaysOpen. Fixes issue #276.
- Ignore position utility if position option is empty.
- Set preview value before triggering accept event.
- Update Mobile extension & demos.
- Fix position option
- When setting the
usePreview
option tofalse
, the collision setting would changed to"flip flip"
internally and was not behaving as intended. - This option now always defaults to
"fit fit"
unless set to a different setting in the options. - Updated documentation & lined out the
position.offset
note as it is no longer supported in jQuery UI's position utility. - Thanks to Alex W. for reporting this issue via email.
- When setting the
- Fixed switchInput to ignore validation.
- Thanks ags131!
- Fixes issue #265.
- Keyboard event namespacing fixes
- Action key display option can now include HTML. Fixes issue #266.
- The
appendLocally
&appendTo
options now assume the developer's desire for a static keyboard position.-
Restore the original behavior by adding back the following css:
.ui-keyboard { position: absolute; left: 0; top: 0; }
-
- Fix Colemak demo; contenteditable not yet supported.
- Check for jQuery UI before checking for position utility. Fixes issue #263.
- Colon key now works without mousewheel script. Fixes issue #264.
- Add Colemak keyboard to the build-in layouts.
- Add
appendTo
option. Fixes issue #253. - Backspace action key function
$.keyboard.keyaction.bksp
is now correctly called. Fixes issue #261. - Add Chinese, Mongolian & Hindi layouts. Thanks to Sh1n!
- Include minified version update...
- Empty buttons class names are once again set as
ui-keyboard-empty
, instead ofui-keyboard-
. Fixes issue #244 - Empty buttons can now include a width setting
- The width is set using the same method as the space setting (
{empty:1.0em}
or{empty:20px}
- Note that the
em
width values actually get doubled to be consistent with the spacer (see spacers for more details)
- The width is set using the same method as the space setting (
- Destroy method works before keyboard is revealed. Fixes issue #247.
- Add
type
attribute to virtual keyboard buttons - Scramble extension no longer ignores spacers. Fixes issue #240
- Fix initial focus - when a preview input is used, the focus is again transferred to it upon keyboard opening.
- Fix remember caret position in preview input after reveal (except in IE; not sure why)
- Caret plugin now accepts an object
- Updated all extensions to work with v1.18+
- Previously, extensions assumed that a built keyboard would always exist in memory
- Extensions are now reapplied when a "new" keyboard is revealed.
- Custom layouts are now stored using a unique hash; this fixes the broken main demo page with lots of custom layouts.
- Attempt to fix external links on the mobile demo pages... grrrr.
- Modified script so only one keyboard is built per layout
- Only the initial keyboard for a specific layout will show any lag time while the layout is built.
- All subsequent keyboards with the same layout will merely make a copy of the already built layout.
- Each input will get its own copy (clone) of the keyboard in case the keyboard is set to always be open or stay open.
- When the keyboard closes, it is destroyed. This was done to reduce the amount of memory utilized when many inputs have keyboards assigned.
- Fixes issues #217, #238 and possibly issue #92.
- Mobile extension (all thanks to BrandonLWhite):
- Resolved issue with Flash of unstyled content (FUOC) when using jQuery Mobile. Fixes #233.
- Add demo page for jQuery Mobile v1.4.
- Fix an error with numeric keys causing javascript errors
- Navigation extension:
- Added caret navigation - it utilities the Insert and Delete keys to move the caret right and left, respectively.
- Update demo styling
- Bower correction
- Merge update to bower registered name
- Add instructions to install using bower in the readme
- Thanks to lorenzo-stoakes!
- Add support for jQuery Mobile 1.4 button styles. Thanks BrandonLWhite!
- Merge fixes to Tamil layout
- Add minified extensions:
- Includes a file with all extensions with mousewheel plugin both minified & unminified.
- Fixes issue #223.
- Tab navigation now works properly when
usePreview
isfalse
. Fixes issue #221.
- Position collision options are no longer overridden, if already set
- Add missing text/link in scramble demo.
- Caret positions correctly when keyboard is
alwaysOpen
. Fixes issue #214. - Typing extension correctly detects visible keyboards.
- Added scramble extension
- This extension scrambles targeted keys (
targetKeys
option) within each keyset - The
byRow
option (default istrue
) will scramble the targeted keys by row; iffalse
, the targeted keys within the entire keyset will scramble. - The
randomizeOnce
option (default istrue
) will only randomize the keys once; iffalse
, the targeted key will scramble every time the keyboard is opened. - See the documentation for initialization code.
- This extension scrambles targeted keys (
- Restructuring & general code cleanup to allow the scramble extension to work.
- Add Tamil keyboard layout. Thanks to the Ezhil-Language-Foundation.
- Fixed
stayOpen
to again work properly. Fixes issue #211.
- Caret should no longer get stuck. Fixes issue #207.
- Added
{left}
and{right}
action keys which move the caret within the input (demo).
- Fixed download links in demos.
- Bumped version number because of some weirdness.
- Fixed mousewheel message to now only show up if a key has differing multiple keysets.
- Fixed autocomplete extension to now properly work with both newer and older versions of jQuery UI. Fixes issue #177.
- Added the
buttonHover
class to a virtual keyboard key when the "touchstart" event is fired to provide visual feedback. Attempt to fix #179. - Added script to prevent simultaneous "mousedown" & "touchstart" events from producing double entries. Fixes issue #184.
- Added colon to the list of accepted keys. Fixes issue #197.
- Fixed issue with close not being triggered when clicking in another input with a keyboard attached. Fixes issue #199.
- Merged in fix for preventing an error when hiding the keyboard using the navigation extension. See pull #200. Thanks @jmsanzg
- Merged in
bower.json
file addition by @peters and registered, thanks! See pull #202.
- Fixed the autocomplete extension to not close the keyboard when clicking within the autocomplete window, including the scroll bar. Fixes issue #170.
- Fixed an issue in IE8 where a javascript error would occur in textarea when
usePreview
isfalse
. Fixes issue #134.
- Fixed the check combo function to not cause an error when the keyboard is hidden. Fixes issue #168.
- Keyboard visible callback now triggered after the preview gets focus. Fixes issue #147.
- Fixed an issue with IE not giving the preview window focus.
- Thanks to @semmelbroesel for the suggestion.
- Fixes issue #160.
- The
change
callback function assigned in the options now contains proper keyboard parameters- Previously, the change callback function was bound to the change event so that it would be called at the same time as any externally bound event listeners.
- Now the change callback is called slightly before the namespaced change event is triggered.
- The change callback is not called after the keyboard closes, when the non-namespaced change event is triggered.
- This fixes issue #157.
- Virtual keyboard keys should now ignore externally triggered events when the keyboard is hidden
- Previously, externally triggered events on the hidden keys would cause a javascript error.
- This fixes the problem brought up in issue #158.
- After the content is accepted or canceled, a non-namespaced
change
event will now be triggered. This fixes issue #146. - Added French Bépo keyboard layout. Thanks to utilisezlinux! See pull request #152.
- Added Vietnamese layout with Telex combinations. Thanks to tbvinh! See pull request #136.
- Added
initialFocus
option:- When
true
(default), the preview input will be focused when the keyboard becomes visible. - If
false
, no focus will be set. - Thanks to anthonynoisestreet for the feature request in issue #150.
- When
- Version bump to add plugin to jQuery plugin registry.
- Added portuguese layout and modified the layout demo to build the layout selector instead of adding an option element each time.
- Added an
{empty}
special key which inserts a blank unclickable key into the keyboard. Using{sp:1}
will does not add a key, but a blank space between keys. - Added a method to restore the caret position in IE in attempts to fix issue #131.
- Added a
return false
to prevent a click through on elements behind the keyboard when theautoAccept
option istrue
. - Modified the
switchInput
function to now target non-keyboard enabled elements - try this demo. - Removed Opera textarea hack as it has been fixed in the latest versions. This demo should work properly now (keep hitting carriage returns).
- Added
beforeVisible
event - This event occurs after the keyboard object (
keyboard.$keyboard
) has been built. - This event occurs immediately before the keyboard is positioned by the position utility.
- Use this event to position the keyboard if you decide not to include the position utility.
- Discussed adding this event in issue #124.
- All hover states are now cleared:
- When the keyboard becomes visible. Fixes issue #124.
- For touch devices. Fixes issue #114.
- For the navigation extension.
- Fixed autocomplete for jQuery UI v1.9+
- The extension is still backwards compatible with older versions of jQuery UI.
- Fixes issue #115 and issue #128.
- Added
caretToEnd
option - When
true
the caret will always be moved to the end of the content when the keyboard is revealed. - If
false
the caret position will be restored to the last position it was in; at the beginning upon initial opening. - Enhancement request for issue #129.
- Added
lastKey
and$lastKey
to the api (access the api usingkb = $('#keyboard').data('keyboard')
): -
kb.lastKey
contains the last typed character determined using the typed character code (not the actual text), when pressing keys on your actual keyboard, not the virtual one. -
kb.lastKey
contains the value from the clicked virtual keyboard button. - If any keys are mapped, the
kb.lastKey
will contain the mapped key character. -
kb.$lastKey
will be a jQuery object of the clicked keyboard button. If the actual keyboard was used to enter a character, this value will contain an empty array[]
(length = 0). - Enhancement added for issue #127.
- Added syntax highlighting to the demo code.
- Added Thai layout. Thanks to Herve Buyle via email!
- Added iPad touch events.
- Thanks to mfayez for sharing the code!
- Hopefully this fixes issues #100 and #117.
- Added a
{default}
action key definition.- Clicking it makes the keyboard show the default keyset.
- See gitaarik's updated iPad demo code to see how it is used.
- Fixed a problem which should prevent a combo replace error. See issue #116.
- Modified space bar css to not use a negative text indent. See this article.
- Disabled jQuery UI Themeswitcher from the main and layouts demo pages, as the script is no longer available.
- Updated demos to use jQuery 1.8 and jQuery UI 1.9.
- Added iPad & iPad email demos by gitaarik.
-
Fixed error caused by closing a keyboard in OSX using ctrl-esc or alt-esc. Fixes issue #102.
-
Added Japanese and Spanish layouts thanks to pacoalcantara!
-
Added Polish layout thanks to Piotr (via email)!
-
Wide keys now use a
min-width
instead ofwidth
. This allows the key to properly expand to fit the text within it. -
Updated autocomplete extension to save the caret position in IE9. Thanks to banku for the fix in issue #95.
-
Updated navigation extension:
-
Removed the
toggleKey
option. -
Custom key codes can be assigned to any of the navigation keys within the new
$.keyboard.navigationKeys
object. Extend it as follows:// change default navigation keys $.extend($.keyboard.navigationKeys, { toggle : 112, // toggle key; F1 = 112 (event.which value for function 1 key) enter : 13, // Enter pageup : 33, // PageUp key pagedown : 34, // PageDown key end : 35, // End key home : 36, // Home key left : 37, // Left arrow key up : 38, // Up arrow key right : 39, // Right arrow key down : 40 // Down arrow key });
Enhancement request from issue #90. Thanks faboudib!
-
Movement of the highlighted navigation key can now be triggered using
navigate
for predefined movement; see the updated demo```js // navkey contains the name of the key: e.g. "home", "right", "pageup", etc var navkey = "pageup"; $('#keyboard').trigger('navigate', navkey); ``` Or, highlight a specific navigation key using the `navigateTo` trigger: ```js // navigate to the third row and fourth key (zero-based indexes) - [ row, index ] $('#keyboard').trigger('navigateTo', [2,3]); ```
-
- Made api functions
accept()
andclose()
return a boolean showing if the content was accepted or not.
- Switching inputs should now work properly
- Extra thanks to david-hollifield for the help in fixing this bug!
- Fixes issues #86.
- Modified the validate processing to no longer disable the accept button.
- The accept button now gets a class applied indicating if the input is valid (
ui-keyboard-valid-input
) or invalid (ui-keyboard-invalid-input
). - Very basic css added to colorize the accept button for these states.
- Fixes issue #88.
- The accept button now gets a class applied indicating if the input is valid (
- Added
cancelClose
option- This option only works with
acceptValid
istrue
and thevalidate
function returnsfalse
. - If
true
, this option will cancel the keyboard close initiated by the accept button. The keyboard can still be closed by pressing escape or the cancel button. - If
false
, the validate function will ignore the user input, restore the input's previous value, and close the keyboard.
- This option only works with
- Added
{next}
and{prev}
action keys which makes switching between input/textareas easier. - Added the ability to make some action keys get the button action class applied
- The action class (options.css.buttonAction) makes the button stand out like the accept, cancel & enter keys.
- Add double exclamation point to the custom key name
{custom!!}
or to any built-in action key except: {accept}, {alt}, {bksp}, {cancel}, {combo}, {dec}, {enter}, {meta#}, {shift}, {sign}, {sp:#}, {space} or {tab}. - See a demo named "Custom Action Key" to the More Demos section of the home page wiki documentation.
- Added
stopAtEnd
option which whentrue
prevents the default switch input function from wrapping to the first or last element. Useful when used in combination with the new{next}
and{prev}
action keys. - Modified diacritic key modification code:
- As before, diacritic (dead) key combinations will be ignored when the
{combo}
key is inactive. - But now, in modern browsers, when the
{combo}
key is reactivated, only the two characters immediately to the left of the caret will be evaluated for key combinations instead of the entire input string. - Older IE (IE8 and older) will continue to check and update the entire input string.
- Change made to make dead keys more useful as described in issue #79.
- As before, diacritic (dead) key combinations will be ignored when the
- Fixed
stayOpen
function not allowing keyboards to open/close with multiple keyboards. Hopefully this new method will squash all the problems withstayOpen
andalwaysOpen
options. Fixes issue #82.
- IE should now behave like other browsers when switching inputs; clicking on another input with a keyboard open will now switch immediately instead of requiring a second click.
- Added Latvian layout. Thanks to Ivars via email.
- Modified script to add "ui-keyboard-autoaccepted" class name to the original input if the content was autoaccepted. Discussed in issue #66.
- Multiple keyboards that are always open will not keep focus properly. Fixes issues #69, #73 and #75.
- Fixed carriage return issue in a textarea in IE8 (hopefully). Thanks to blookie for reporting it and providing a fix in issue #71.
- IE should now close the keyboard after clicking accept. Base element will no longer maintain focus. Fix for issue #72.
- Reveal will no longer unbind all events when
openOn
is empty. Fix for issue #74. - Fixed locked keyboard input not allowing opening the keyboard a second time. Fix for issue #77.
- Fixed
stayOpen
option not working at all. - Added Hebrew layout. Thanks to Ofir Klinger for contributing the work!
- Added a keyboard object as a variable in the typing callback function. Probably not necessary, but added anyway :P
- Fixed an issue of the input clearing when
usePreview
isfalse
andalwaysOpen
istrue
. Brought up in issue #37.
- Added Turkish layouts. Thanks to barisaydinoglu!
- Caret position is now better retained in older IE. Fix for issue #61.
- Invalid input should now revert back to the last valid input instead of breaking the keyboard. Fix for issue #62.
- The repeating key obtained by holding down the mouse on a virtual key can now be disabled by setting the
repeatRate
to0
(zero). Fix for issue #63. - Clicking on a virtual keyboard key will no longer submit a form - fix for issue #64.
- Updated Mobile demo
- Updated to jQuery Mobile version 1.1.0 RC1
- Extra demo css added because the theme selector radio buttons were not displaying properly due to some issues with the data-attributes showing "[Object object]" instead of true or false. I'm not sure why, and don't have the time to investigate.
- Fixed a problem where keyboards with
alwaysOpen
andautoAccept
set totrue
would keep focus on the input when clicking outside the input. Fix for issue #59. - Fixed an issue with
tabNavigation
not working properly. Also, discovered thattabindex="0"
should not be used. Fix for issue #60.
- Multiple synchronized keyboards with
alwaysOpen
andautoAccept
set totrue
should now switch properly. Fix for issue #58.
- Multiple synchronized keyboards with
alwaysOpen
set totrue
should now switch properly. Fix for issue #58.
- Updated jquery.mousewheel.js, as the it was only scrolling in one direction.
- Fixed an issue with an internal caret positioning flag not being set correctly. This change also fixes issue #57.
- Updated mobile extension
- It now works with jQuery Mobile v1.0.1.
- The extension no longer uses the mobile buttonMarkup function, it just applies the css class names.
- Added a hover button option and theme selector.
- I don't think I'll support the Mobile theme selector because it's not a bookmarklet like I thought it would be. But please feel free to point the mobile stylesheet to a custom mobile theme. The extension will support any of the theme letters (A through whatever).
- Caret position is now saved
- This started as a fix for all versions of IE, but now applies to Firefox and Opera. It's not working in Webkit (Chrome & Safari) for some reason.
- When clicking in an input, the keyboard will now open with a new preview window showing or with the existing input with the caret in the position where it was clicked in the text.
- Hidden inputs will remember the last caret position when revealed.
- Fix for the new issue added into issue #24.
- Fixed an issue with using
jQuery.noConflict()
in older IE. Fix for issue #55. - Added two Hungarian (Magyar) keyboard layouts. Thanks to Tóth Gergely for sharing - from issue #48.
- Fixed a problem with IE8 and hidden inputs. Apparently the original IE8 and not IE9 in compatibility mode has this problem. Thanks to Chris Mullins in issue #56.
- Fixed an issue with the enter key that was introduced in 1.9.8 - sorry!
- The way the key spacer
{sp:#}
is added has changed:- Previously, a span of zero dimensions with a side margin of #em was added, i.e.
{sp:1}
would add a "margin: 0 1em" which adds 1em to the left and right. - Now, because Firefox doesn't seem to want to render a zero dimension span at all, I've switched it to settig the span width.
- So,
{sp:1}
now becomes a span of "2em" width, to keep this consistent with the way this method worked previously. - If you have issues with this, I made one additional change in that you can now set this space using pixels:
{sp:20px}
which only makes the width 20 pixels. - Additionally, if you can now use a non-western format to set the space:
{sp:1,5}
or{sp:1,5em}
will now make the span 3em's in width. - This will fix the problem brought up in issue #48.
- Previously, a span of zero dimensions with a side margin of #em was added, i.e.
- Pressing the real keyboard enter key will now use the
$.keyboard.keyaction.enter
function. Discussed in issue #47. - Updated all demos to use jQuery 1.7+.
- Fixed a problem with the mouse up event not returning focus to the input, possible fix for issue #45.
- Changed
acceptValid
default value fromtrue
tofalse
. - Updated link to jQuery Mobile from 1.0rc1 to 1.0.
- Added package.json in anticipation of the jQuery plugin site.
- Added
acceptValid
option- When true, all input is continually checked using the
validate
callback function, if valid, then the accept button is enabled; otherwise it is disabled. - When false, the input is not checked after each input; but the
validate
callback is still called when the input is accepted. - Added a "disabled" class to the css which is applied to the accept button when disabled.
- When true, all input is continually checked using the
- Changed the
validate
callback function- It no longer automatically triggers the "canceled" event, you can do that within the callback.
- If the input is invalid and the keyboard is closed/canceled, the
validate
callback will no longer abort the close. - Added an
isClosing
variable which is onlytrue
when the content was accepted. TheisClosing
variable isfalse
when the validate callback is called during input.
- Added a
validate
callback function-
This function is called when the keyboard is attempting to close.
-
If the function returns true, the keyboard will continue on, accept the content and close (if not always open).
-
If this function returns false, then a "canceled" event will fire and the keyboard will abort the close.
-
Any other actions can be performed or called from inside of this function. For example, if the value is invalid, you can clear the keyboard input:
```js $('#keyboard').keyboard({ validate: function(keyboard, value){ // test value to only allow numbers var test = /\d+/.test(value); // if the value is invalid, clear the input if (!test) { keyboard.$preview.val(''); } // return valid test (true or false) return test; } }); ```
-
- Modified to prevent the keyboard from being added multiple times to a single element. Previously, calling the keyboard on an element a second time would add a second keyboard and detach the first one from the plugin.
- Added
switchInput
callback to the options; it replaces the default switching input code if added. - Fixed Navigation extension to not repeat keys. Fix for issue #36.
- Fixed Autocomplete extension to allow selecting an item on click. Fix for issue #35.
- Fixed key repeat problem reported in issue #32.
- The placeholder attribute in the preview window is no longer being removed. So, if the preview input loses focus, the placeholder message will return; but this will only work in browsers that support the HTML5 placeholder attribute. The plugin only adds this enhancement to the original input, if the browser doesn't support it. Requested by Attila.
- Fixed the spacer key to now accept decimal numbers
{sp:1.3}
; previously only{sp:1}
or{sp:.5}
would work. Additionally, a new class name for these spacers was added -ui-keyboard-spacer
with some css to prevent Opera from increasing the line-height of the row - reported by Attila, Thanks! - Opera should now also give the input/textarea focus when the keyboard opens. Reported by Attila.
- Main demo page will now dynamically adjust in width, except in older IE.
- Added "ui-keyboard-input-current" to the input that has a keyboard open - useful for highlighting the input when
usePreview
isfalse
. - Added
enterNavigation
option: - When true, pressing enter (shift-enter in textarea) on either the real or virtual keyboard will shift focus to the next input with a keyboard attached. I am considering changing this to the next input ( with or without a keyboard attached ).
- When false, pressing enter do nothing in an input and shift to the next line in a textarea.
- Fixed the mouse repeat code to not repeat action keys. Fix for issue #32.
- Fixed space bar title from the mousewheel message to the space bar message.
- Keyboard not closing properly... blond moment alert!
- Apparently I forgot that the body doesn't always fill up the browser window. So on the basic demo, you have to click above the input to close the keyboard.
- Changed "body" back to document, so ummm ignore that comment about clicking on the scroll bar not closing the keyboard anymore.
-
Fixed caret positioning issues in IE9 introduced in v1.8.12:
-
IE9 caret position is now saved so if the input loses focus, the caret position is restored. Fix for issue #24.
-
IE9 caret position can now be set by mouse clicking inside the input/textarea.
-
Fixed an issue with restricted input causing an error when trying to add any of these special characters: []^$.|?*+(){}
-
Rewrote the code that closes the keyboard when clicking outside of the keyboard.
-
Done because of the above IE9 caret issue.
-
The overlay that was added to all IE browsers was removed, along with its css. It was originally added because if a keyboard was already visible, a new keyboard would not open when focus is given to a new input/textarea. This is no longer an issue with the new code.
-
Clicking on the scrollbar to scroll down the page will no longer close the keyboard.
-
The keyboard will now stay in place when resizing the browser window. YAY!
-
Added
repeatDelay
andrepeatRate
options: -
These options work with the new mouse key repeat functionality.
-
Basically holding down a virtual keyboard key with your mouse or finger on a touch device, will now cause that key to repeat after an initial delay. Similar to what the real keyboard does while typing.
-
Adjust the
repeatDelay
to change the amount of time to pause before starting to repeat the key. -
Adjust the
repeatRate
value to change the characters per second entered into the input area. Please note that due to the variation in javascript speeds between browsers, the maximum repeat rate my vary - in Firefox, it appears that there is no difference in rate with numbers above 20. -
This enhancement was added thanks to Pascal-bach's request in issue #32.
-
Added css3 media queries to the keyboard.css file, so the keyboard should resize to match the available screen width.
-
Added a
css
option: -
This option contains all of the jQuery UI class names used by the plugin to allow for further customization.
-
The css option include css for the major elements ("input" and "container") and the different button states ("buttonDefault", "buttonHover", "buttonActive" and "buttonDisabled").
-
I was going to try to replace these classes to make the keyboard work with jQuery Mobile themes, but that theming system is a bit more convoluted, so I made a mobile extension instead (see below).
```js css : { input : 'ui-widget-content ui-corner-all', // input & preview container : 'ui-widget-content ui-widget ui-corner-all ui-helper-clearfix', // keyboard container buttonDefault : 'ui-state-default ui-corner-all', // default state buttonHover : 'ui-state-hover', // hovered button buttonAction : 'ui-state-active', // Action keys (e.g. Accept, Cancel, Tab, etc); this replaces "actionClass" option buttonDisabled : 'ui-state-disabled' // used when disabling the decimal button {dec} when a decimal exists in the input area } ```
-
Removed the "actionClass" option in favor of the "css" option above.
-
Added a jQuery Mobile extension (v1.0)
-
This extension allows jQuery Mobile themes to be applied to the keyboard.
-
Set the desired theme swatch letter in the options for the container, regular buttons, action buttons and active buttons.
-
Updated keyboard.css with mobile specific definitions - wider keys needed because of font size and "text-overflow:ellipsis" use
-
Note:
- The new css3 media queries may not work perfectly for the jQuery Mobile themes - I don't own an iPad/iPhone/iWhatever, so please adjust and report back to me any issues.
- The "Active Buttons" setting is limited in that if the swatch letter of the Regular buttons is greater than the swatch letter of the Active Buttons, the theme doesn't apply properly. For example, Regular button swatch B with Active Button swatch A won't work because of the way the css is set up.
- When the jQuery Mobile Theme Roller become available, I will add it to the demo page.
- Changed the license to a MIT License.
- Previous versions will be retroactively converted from a Creative Commons Attribution-Share Alike 3.0 Unported License to a MIT License.
- I have spoken with the original author, Jeremy Satterfield, and he has agreed to this change.
- This licensing change applies to all of the extensions as well, which were previously dual licensed under MIT and GPLv2.
- Hopefully these changes will make it easier for everyone to use this plugin!
- The layout files will remain under WTFPL.
- Added
tabNavigation
option:- Setting this option to
true
allows the tab key (on the real keyboard) to tab into the next input/textarea. - When true, this option works best when the
usePreview
option isfalse
.
- Setting this option to
- Added
appendLocally
option:- This option was added to append the keyboard within the same container as the input it is attached to.
- The advantage of doing this allows for setting the
tabNavigation
option totrue
and tab to the next input area. Otherwise, the keyboard is appended to the body of the page and the next tab will switch the focus to the browser location window. - The disadvantage of setting this option to
true
is that the keyboard width will be limited by the width of the input container. If you set this option to true on the main demo page (index.html), all keyboard widths will be limited to the width of the.block
class which groups each demo - it's not pretty.
- Fixed
restrictInput
to better work with multiple length keys - It is now designed to remove any non-matching characters or letter groups. For example, if you clicked a key to enter "Hello" then hit the backspace, what would be left is "Hell" which doesn't match any keys, so "Hell" will also be removed.
- One issue I noticed is with entering numbers, as mentioned in issue #28. Say you enter "3131" then hit the backspace, the plugin would see "313". Well there is no lone "3", but there is a "13" and because it starts from the left side of the string, it decides to remove the "3" and you end up with "13".
- Updated Layouts demo & current layouts
- Each language layout now includes the display options to modify the keyboard language (alt, accept, cancel, shift, etc).
- Since I'm a silly American that isn't fluent in any other language, I've only attempted (and poorly at that) to change the Albanian display language. All other layout languages still have English as the display language, so please feel free to share any corrections.
- Added options to the Navigation extension
-
position : [0,0]
- This sets the current highlighted key position. The array contains the row number and the key index (zero based index). -
toggleMode : false
- Sets the focus of the navigation keys. When true, the focus is the virtual keyboard and when false the input/textarea gets focus. -
toggleKey : 112
- This sets which key is used to toggle the navigation focus. The function 1 (F1) key has anevent.which
key value of 112. -
focusClass : 'hasFocus'
- This sets the css class to add to the virtual keyboard to indicate that it has focus (toggleMode is true).
- Fixed the navigation extension to not include a return key to the input area unintentionally.
- Changed some of the data attributes for each virtual keyboard key
- Added
data-pos
which contains the button's row and row-index - used by the navigation extension. - Removed the data that is now in
data-pos
from the button name attribute. - The name attribute now contains the action key name (e.g. Enter, Accept, etc) or the key's ascii character code (e.g. "a" has a name attribute of "97").
- Added
- Typing Extension (v1.3)
- Updated to work when
alwaysOpen
istrue
- it never knew the keyboard was open.
- Updated to work when
- Autocomplete Extension (v1.2)
- Updated to work when
alwaysOpen
istrue
.
- Updated to work when
- Added navigation extension (v1.0)
- This extension allows you to navigate the virtual keyboard using the navigation keys: up, down, left, right, pageUp, pageDown, home and end.
- The disadvantage is that now you will need to use the mouse to position the caret inside of the input or textarea.
- Pressing enter will trigger the key - same as mouse clicking on it.
- Updates for changes brought up in issue #20:
- Fixed the ability to switch to the base meta keyset if the meta set doesn't have a shift or alt key. Previously, it would just ignore the keyset change.
- When the
stickyShift
isfalse
, switching to any meta key set will now release the shift key. - Thanks for the suggestions Pascal-bach!
- Updated the caret script
- It will now differentiate IE9 from older versions, as IE9 behaves like the other modern browsers.
- There are still problems with Opera, IE7 and IE8 in textareas with multiple carriage returns; but it's a little bit easier to deal with.
- Safari still does not return the correct caret position in the QWERTY Text Area demo with locked input (readonly is applied to the textarea). So any entered text will always be positioned at the start of the text area. I'll try to figure out a work around for this.
- Ctrl (or Command) Y and Z are now allowed keys to enable use of the redo and undo keyboard shortcuts.
- Added
{lock}
action toggle key. - This key will act like a caps lock key, but as described in the last update, its status does not always match the actual caps lock key
- This behaviour could be very confusing to users, so I decided not to include the caps lock key in any of the default keyboards. But it is available.
- When active, the shift key set will be visible until the caps lock or shift key is pressed.
- Added
stickyShift
option - This option only applies to the virtual keyboard keys (mouse clicks), the actual keyboard overrides this option.
- When true, the shift key will behave as it always has - it will toggle the shift key set until pressed again.
- If false, the shift key set will remain active until after the next key is clicked on.
- Removed some uncommon default diacritics & ligatures
- they can easily be added back using the
combos
option - the regex wasn't changed - ' + c = ç, ' + C = Ç
- ~ + n = ñ, ~ + N = Ñ
- a + e = æ, A + E = Æ
- o + e = œ, O + E = Œ
- Added caps lock key functionality
- No caps lock key was added to the keyboard. The existing shift key should show the status of the caps lock (inconsistently).
- There is no reliable method to detect the state of the caps lock key, except while typing the normal alphabet.
- The displayed key set will properly update when the user starts typing.
- Pressing the shift key on the keyboard will override the key set shown; but if the caps lock is enabled, the shift state will correct itself when typing is resumed.
- Using a mouse still functions as before - clicking the shift key toggles its state.
- Added shift, alt and shift-alt keysets to meta keysets.
- When adding these keysets to the layout, use
meta#
,meta#-shift
,meta#-alt
andmeta#-alt-shift
. - Enhancement request from pascal-bach in issue #17, thanks for the suggestion!
- Updated the Custom: Meta Sets demo to reflect these enhancements.
- Fixed a bug where multiple "alwaysOpen" keyboards would not switch focus.
- Fixed a bug that expanded the keyboard/moved it each time it is opened - one pixel at a time.
- Added a Danish keyboard layout, thanks to Torben Junker Kjær!
- Changed the name of the Scandinavian keyboard layout to Swedish. Also thanks to Torben.
- Added
ui-keyboard-has-focus
- This class is added to the keyboard when it opens
- If the keyboard has
alwaysOpen
set totrue
, the currently focused keyboard will have this class applied. - In the base css, the z-index of this class is slightly bigger than the open keyboard.
- Added Russian layout - thanks to Yury Kotlyarov.
- Added
alwaysOpen
option- Setting this option to
true
will keep the keyboard open at all times. - The keyboard will automatically open when initialized.
- The class
ui-keyboard-always-open
will be added to the keyboard. - See the Layout demo page to see this option in action!
- Setting this option to
- Renamed
placeholder
class toui-keyboard-placeholder
.
- Fixed lockedInput causing errors in Firefox - fix for issue #12.
-
Replaced all the keyboard keys with
<buttons>
instead of<input>
to allow adding of an image overlay. -
Removed all keyrow wrappers, so now every key is floating inside the keyset. This allows you to make different sized keys and position them however you want with the CSS.
-
NOTE Changed the order of parameters in every event!
-
Sorry if this breaks any extra coding you may have added, but I did it to provide a keyboard object with every event and make everything more consistent.
-
Previously you had to use "$(el).getkeyboard()" function inside of the event function to get the keyboard object.
-
In the event callback, the order is now (event, keyboard, elem). Where "event" is the event object, "keyboard" is the keyboard object and "elem" is the input element (non jQuery).
-
The only event function that is different from the above order is the "beforeClose" event! The old order was (event, element, accepted).
-
The new order is now as in this example:
// Binding to the "beforeClose" event - it has an extra parameter ("accepted") $('.ui-keyboard-input').bind('beforeClose.keyboard', function(event, keyboard, elem, accepted){ var txt = "Virtual Keyboard for " + elem.id + " is about to close, and it's contents were "; txt += (accepted ? 'accepted' : 'ignored'); txt += '. Current content = ' + elem.value; txt += '. Original content = ' + keyboard.originalContent; alert(txt); });
-
see the Methods wiki documents page for more details.
-
-
Fixed an issue in Chrome where the caret would go out of view while typing on the virtual keyboard (horizontal scrolling of inputs).
-
Fixed the typing extension not highlighting the tab or backspace while typing.
-
Added "initialized" event which is triggered when the keyboard script has completed initialization.
-
Added a basic demo page, called "basic.html". This is a minimal setup.
-
Added a basic scientific calculator demo page. For demonstration only, it's not meant to replace your calculator but to show how to add more key actions, change display names and apply image overlays to the keys.
-
Moved demo files into a separate directory.
-
Updated all demo pages to HTML5 formatting.
- Fixed a problem with decimals not working in European format when
restrictedInput
istrue
. - Fixed code that allows adding custom action keys. It now works properly when adding a corresponding display option. Examples added to the Actions wiki page.
- Added
beforeClose
trigger and callback which is called just before the contents are accepted/canceled. - Fixed keyboard positioning to now include
offset
options... opps!
- This version is NOT BACKWARDS COMPATIBLE!
- Added event namespacing
-
If you used any custom binding events (i.e. keyboard 'visible', 'hidden' or content 'accepted', etc.), then just add '.keyboard' to the end of the event to make your script compatible with this version. Example:
$('.ui-keyboard-input').bind('accepted.keyboard canceled.keyboard', function(event, elemnt){ // event.type will contain "accepted" or "canceled" as before, event.namespace will contain "keyboard" var txt = $(elemnt).attr('name') + ' keyboard was closed and its content was ' + event.type; });
-
Namespacing was added because of the addition of multiple new keyboard layouts. Use the destroy method when switching layouts (see the layouts.html source for an example).
-
Because of the namespacing, this version now requires a minimum of jQuery 1.4.3+
-
- Added
{combo}
action toggle key. While active, typing combo keys will continue to work as before. When inactive, combo keys are ignored, but all combos will be formed once active again. - Improved the caret positioning to now allow replacing selected text - special thanks to Derek Wickwire for the code!
- Text selection and navigation using arrow key shortcuts (shift-arrow, shift-ctrl-arrow, etc) now work as expected (except maybe in IE & Opera textareas with multiple carriage returns).
- Fixed an issue with the keyboard closing automatically when a key set doesn't exist.
- Virtual keyboards with
restrictInput
enabled (set to true) will now allow the use of delete, backspace and some navigation keys (arrows, home & end). - Typing on the virtual keyboard should now keep the cursor in view (in a textarea). It may be a bit buggy in IE.
- Updated the typing extension (also not backwards compatible):
- Fixed a bug introduced into the typing extension with the last update... it wouldn't change keysets properly while typing - oops!
- It will now simulate typing on the virtual keyboard while typing on your real keyboard.
- When the extension is enabled, pressing Shift or alt on your real keyboard will change the displayed keyset on the virtual keyboard; but when using the alt in Windows, you'll have to press it twice to return focus from the menu back into the keyboard window (see known issues above).
- Two new options were added to the typing extension.
showTyping
anddelay
.-
showTyping
(default is true) will enable or disable the virtual keyboard typing simulation, but the "typeIn()" function simulation will continue to work as it did before. -
delay
will set the delay of the virtual keyboard highlighting that occurs while the user types on the real keyboard.
-
- Fixed autocomplete extension problem with arrow key navigation resetting the list. It still does it, but very rarely.
- Changed mapped keys introduced in version 1.7.7 to allow entering the actual key to change instead of the "event.which" value (which ends up being different depending on your browser - see http://unixpapa.com/js/key.html).
-
Mapped keys will allow the user to type directly from the keyboard and enter the keys seen on the virtual keyboard.
-
When defining a keyboard layout, assign the map value along with the key as follows:
"n(a):title/tooltip \u03b5(e):lower_case_epsilon_(type_e) \u0395(E):upper_case_epsilon_(type_E)"
-
n
is the key value (\u03b5 in the second example). -
(a)
is now the actual keyboard character to replace (e in the second example). So in this example, when the user presses the "a" key on the keyboard, the character "n" will be entered into the input. -
:title/tooltip
is the title/tooltip added to the key's title attribute and pops up when hovering over the key. All spaces must be replaced with an underscore "_". If you use spaces, the script will assume you are assigning a new key. -
See the "Mapped keys" demo for a full example and code.
-
- The Decimal key (for a unique decimal) will now function properly when changing the display option for decimal from ".:Decimal" to ",:Decimal" (European notation).
- Added a layouts directory which contains the first few of many new layouts for various languages.
-
Not that many layouts are available yet... adding more as I have time.
-
To use a keyboard layout, include the file in the page header
<script src="layouts/albanian.js" type="text/javascript"></script>
-
Then initialize the keyboard using the appropriate layout name (found inside the file).
$('input').keyboard({ layout: 'qwertz-albanian' });
-
See the "layouts.htm" page source
-
-
Added
usePreview
option- When true will add a preview window above the virtual keyboard (same as in previous versions).
- If set to false, the actual input/textarea will be used.
- Added
at2
option to theposition
option which is used when this option is false to position the keyboard so it doesn't cover up the input. - Added
.ui-keyboard-overlay-input
css class which is only used in IE and when this option is false. This is to keep the input above the overlay.
-
Added mapped keys
-
Mapped keys will allow the user to type directly from the keyboard and enter the keys seen on the keyboard.
-
When defining a keyboard layout, assign the map value along with the key as follows:
"k(m):title/tooltip \u03b5(69):lower_case_epsilon_(type_e) \u0395(69s):upper_case_epsilon_(type_E)"
-
k
is the key value (\u03b5 in the example). -
(m)
is the keyboard character code (69 from event.which value for "e" on the keyboard). -
(ms)
is needed for shifted keys because the mapped numbers need to be unique. So shifted keysets must have a character code followed by an "s" (for shift). -
:title/tooltip
is the title/tooltip added to the key's title attribute and pops up when hovering over the key. -
At this time, this functionality is limited to the default and shifted key sets. If alt or meta key sets are added, these keysets will be ignored; but only when direct typing on the keyboard (the virtual keyboard will still work as usual).
-
See the "Mapped keys" demo for a full example and code.
-
-
Pressing the tab or enter key inside of an input will now be ignored. Previously it added a "\t" or "\r\n" respectively which sometimes appeared to be adding a space.
-
Made keyactions into a public method to make it easier to modify. For example, to make the enter key inside an input to automatically submit the form, do something like this:
$.keyboard.keyaction.enter = function(base){ if (base.el.nodeName === "input") { base.accept(); // accept the content $('form').submit(); // submit form on enter } else { base.insertText('\r\n'); // textarea } };
-
Updated the typing keyboard extension to work properly with the public keyactions
-
The "change" event now provides the event object from the change. To use it, bind to the keyboard change event as follows:
$('.ui-keyboard-input').bind('change', function(event, element, keyEvent){ var txt = event.type + ' event triggered on ' + $(element).attr('name') + '; key code = ' + (keyEvent.which !== 1 ? keyEvent.which : keyEvent.text); console.debug(txt); });
-
When using the virtual keyboard, keyEvent.text contains the actual text (keyEvent.which == 1).
-
When typing on a real keyboard, keyEvent.text doesn't exist and keyEvent.which contains the key code.
-
Maybe there is a better method for this.
- Keyboards in IE should no longer continue to expand with each opening of the keyboard - Fix for issue #6.
- Fixed issue #4, no more infinite loop in IE. Thanks pgambling!
- Fixed a bug introduced with the watermark/placeholder script that clears out existing values.
- Fixed a problem with tabbing into an input. When the keyboard opened, the tab would be added (when the keyup event fired) into the keyboard preview area. It will still do it if you keep holding down the tab key because of the auto-repeat. Opera still doesn't add a tab to the area, but instead continues to cycle through the keyboard keys - already a known issue =(.
- Changed some more code around to make JSLint happy, it sure is grouchy around this time of month.
- Password type inputs will now have virtual keyboards with no key hover effects. Hopefully this will increase password security.
- Some code rearrangement.
-
Added
autoAccept
option which, if true, will automatically accept the preview window content when clicking outside the keyboard popup. -
Added
change
callback/event which fires when the input has been changed (key clicked or manually added to the keyboard window). -
Added input watermarks. Use HTML5 placeholder attribute, the script will emulate it if the browser doesn't support it.
-
Changed accepting content in input boxes from pressing enter to shift-enter (now the same as the textareas). This was changed to allow selecting items in the autocomplete popup when using the extension.
-
Rearranged code to allow limited chaining of functions and opening a virtual keyboard externally - the function is named
reveal
. See example below. -
Renamed "acceptClose" function to
accept
. This function will accept the content and close the keyboard. -
Renamed "kbHide" function to
close
. This function will close the keyboard and ignore the contents. -
Made some functions chainable to allow the following code:
// $('#example').getkeyboard() returns keyboard data object, same as $('#example').data('keyboard') var example = $('#example').getkeyboard(); example .reveal() // opens the virtual keyboard (chainable) .insertText('Hello World'); // instantly enters "Hello World" into the input area // do something else here // when done you can example.accept(); // accepts the content & closes the keyboard
-
Added an extension which will simulate typing on the keyboard for tutorials, etc. Please read the documentation for more details.
-
Setup:
// all keyboards $('.ui-keyboard-input') .keyboard(options) .typing(); // or if targeting a specific keyboard $('#keyboard1') .keyboard(options) .typing();
-
Basic Usage:
// get keyboard object, open it, then start typing simulation $('#keyboard-input').getkeyboard() .reveal() .typeIn('Hello World', 700); // types in the text with a 700ms delay between letters. No callback included. // get keyboard object, open it, type in "This is a test" with 700ms delay between types, then the callback function will accept & close the keyboard. var kb = $('#keyboard-input').getkeyboard(); kb .reveal() .typeIn('This is a test', 500, function(){ kb.accept(); }); // types in the text with a 500ms delay, then accepts the content when done.
-
-
Added an extension which integrates the keyboard with jQuery UI's autocomplete widget. Please read the documentation for more details.
-
Setup:
// target a specific keyboard, or use $('.ui-keyboard-input') to target all $('#keyboard1') .keyboard(options) // keyboard plugin .autocomplete(options) // jQuery UI autocomplete .addAutoComplete(); // keyboard autocomplete extension, there are no options
-
- Prevent keyboard below the accept key from opening (stopped the event propagation) - fixed issue #2.
- Setting
restrictInput
to true now prevents showing invalid keys in the input/textarea while typing. - Added
preventPaste
. When true, it prevents pasting content into the input/textarea by either (ctrl-v) or the right-click menu. - Fixed issue #1 to prevent potential problems with prototype.
- Numerous problems were introduced with the release of jQuery 1.5 and jQuery UI 1.8.9, so the core code no longer uses the jQuery UI widget factory, but still needs jQuery UI. There were no changes to the way this plugin is called or modified with options.
- Cleaned up code and made some parts more readable.
- Fixed IE keyboard going across the screen. Removed 100% width from the
.ui-keyboard-preview
css as the width is now set in the code. - Fixed IE placing cursor at beginning of content when opened a second time.
- Fixed IE memory overflow error using custom events. Somehow related to jQuery 1.5.
- Fixed IE problem with clicking in another input block which did close the previous virtual keyboard, but did not initialize the keyboard in the input/keyboard that was clicked inside. Added an overlay under the keyboard, in IE only, to resolve this problem.
- Replaced custom caret code and added the Caret plugin (by C.F.,Wong) into the core. This resolved caret positioning problems in IE, except in textareas with lots of carriage returns.
- Pressing "Enter" inside of an input or pressing "Shift-Enter" inside of a textarea will now accept the content. Added label to the Accept button to indicate this shortcut is now available.
- Pressing "Tab" inside of the keyboard input/textarea will now add a tab instead of navigating to the first key in the keyboard.
- Known problems section added to readme.
- Added
restrictInput
option which when true will only allow keys that exist in the virtual keyboard to be typed/pasted into the window.
- Removed jquery-ui class "ui-helper-hidden-accessible" as the recent change now prevents the popup from showing.
-
Copied code from the jQuery Caret plugin to allow inserting text at the caret inside the preview window. It may not be perfect, but it appears to work in the latest versions of Firefox, Chrome, IE and Opera.
-
Added a
maxLength
option to limit the amount of text. It is set tofalse
by default which disables the limit. -
Added a way to name keys, these names are added to the key's title attribute. If a tooltip plugin is used on the page, just target '.ui-keyboard-button' and get the tooltip from the title.
-
Keys defined in the
display
option follow this format "Key Name:Key's Label". The "Key Name" is what is actually shown on the virtual keyboard, while "Key's Label" is added to the key's title attribute. The "Key's Label" can include spaces.display: { 'accept' : 'Accept:Accept the Content', 'meta1' : '\u2666:Alternate character set', // Diamond 'meta2' : '\u2665:Some other character set', // Heart }
-
The key names defined in the
customLayout
cannot include spaces, the script will assume you want a new key. So only in thecustomLayout
follow this format "key:Key_Label" - replace all spaces with an underscore. Here is an example (view demo.js for another example - Meta):customLayout: { 'default' : [ '! @:this_is_an_at_symbol # $ % ^ & *:this_is_an_asterisk ( ) - + {bksp}' ] }
-
View demo.js source for more examples.
-
-
Added
dec
to thedisplay
options for the decimal key (only allows one decimal). It wasn't previously added because the decimal key was just a period; now it can have a label! YAY! -
Added a+e and o+e ligatures to the combination keys.
-
Replaced Hebrew characters from the Meta Sets Demo - it added characters from right-to-left and mixing them with left-to-right characters would just confuse people too much (as it did to me o.O)
-
Changed Custom: Junk demo to include vowels and accent keys to allow visualization of inputing combo keys.
- Added optional modifier keys (meta) to add additional key sets. There is no limit on the number of meta keys you can add. Look for meta key in the customLayout section for more details.
- Changed keyset class names to include '-keyset' in them.
- Completely changed the layout format
- When adding a custom layout, each keyset is named with all of it rows. This will make it easier to add meta key sets without defining shift and alt key sets as would be necessary in the original formatting. See the customLayout section for more details.
- Each keyset now contains the keyboard rows instead of each row containing each keyset. See the example HTML in the Theme section above.
- Added another method to position the keyboard since the
position
propertyof
works well if you target a single target. This new method requires the target to be added to the element data - in a variable namedkeyboardPosition
. See the positioning section above for more details.
- Keyboard build now occurs after the target element gets focus to speed up startup.
- Added 'ui-keyboard-input' class to the target element.
- Added
wheelMessage
to allow changing the language - this message is added to the hovered key's title attribute to so the user knows they can use the mousewheel to see the other key sets for that same key. - Added event triggers -
accepted
,canceled
,hidden
andvisible
. Open the (Firefox) firebug console to see the callback messages on the demo page. - Added
position
propertyof
. By default (when it isnull
) it is set to the input element, but you can change it so the keyboard attaches to another object. - Modified the code to work with hidden inputs - but not
type="hidden"
inputs! See the last example on the demo page. - Added destroy method.
- Changed class of preview window from 'ui-state-active' to 'ui-widget-content' because it looks bad in some themes.
- Added 'ui-widget-content' class to the element (input or textarea).
- Added International keyboard Layout (AltGr key) and expanded the keysets up to four.
- Added more special/"action" keys:
- Previous text only keys now have a companion symbol only key. The abbreviated names contain only a symbol so as to fit the layout style as desired.
- Added alt key to allow accessing two additional key sets.
- Changed name of {neg} to {sign}. This key changes the sign of the input.
- Added tab key
- Fixed positioning utility problem I added in the last version - show the popup before positioning (duh).
- Added
position
option to allow positioning the keyboard anywhere around the input/textarea. - Added
display
option to support multiple languages or change key symbols. - Added
actionClass
option to allow changing the style of the accept and cancel keys. - Added
lockInput
option to lock or unlock the ability to access the preview window. - Added
keyBinding
option to change the keyboard key behaviour. - Added
useCombos
to enable the dead key emulation which allows entering diacritic key combinations. - Using the escape key now closes the keyboard.
- Added mousewheel support to allow scrolling through the other keysets while hovering over a key.
- Added ARIA support (may not be complete).
- Made a copy of the code and documentation hosted at snipplr on github.
- Slightly modified the code to correct JSLint nags. All except functions in a loop and adding conditions inside for in loop - will be fixed in next version.
- Had to fix the keyboard positioning so it would work in IE properly
- Using jQuery UI position utility was causing a bug where opening the keyboard popup more than once would move the popup down and left
- See a demo of the problem here: https://jsfiddle.net/Mottie/EMXGF/.
- Will add you Jeremy when you get a github account :)
- Attach keyboard to the body tag for instances where a parent element is position relative
- Add focus method to refocus the input preview so that a cursor is visible
- Update positioning to jQuery UI 1.8 position method
- Other tweaks for cleaning code
- Hide keyboard when clicking outside of keyboard
- Tweek positioning to fit better on screen if page scrolled or resized
- Align keyboard with element it is called from
- Append keyboard DOM to elements parent instead of body
- Change Preview window to clone the selected element to match the proper formatting of the element (i.e. not showing characters in password fields)
- Add Return key to insert new lines into textareas
- Change style of Accept and Cancel buttons to "ui-state-highlight" to standout
- Add ability for designer to create a custom keyboard layout
- Initial build by Jeremy Satterfield.
Home | FAQ | Setup | Usage | Options | Methods | Contenteditable | Theme | Log
Options: Layout | Language | Usability | Actions
Extensions: AltKeysPopup | Autocomplete | Caret | Extender | Mobile | Navigation | PreviewKeySet | Scramble | Typing