Skip to content

Commit

Permalink
Release 1.1.6 (#46)
Browse files Browse the repository at this point in the history
* Updated data in keyboard files and added support for RTL language checking.

* Corrected azeri-latin klc file spelling.

* Built project.

* Bumped version and updated README.
  • Loading branch information
srm985 authored Apr 2, 2019
1 parent d98f264 commit 8fe9e7d
Show file tree
Hide file tree
Showing 191 changed files with 740 additions and 418 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,7 @@ In this release I have addressed several issues related to how the keyboard hand
#### Version 1.1.5

* Revised code to search local languages first, then pull from CDN.

#### Version 1.1.6

* Corrected .klc file name typo of "azeri-lstin" -> "azeri-latin". Left mispelled file also for legacy support.
Binary file modified dist/languages/arabic.klc
Binary file not shown.
Binary file modified dist/languages/azeri-cyrillic.klc
Binary file not shown.
Binary file added dist/languages/azeri-latin.klc
Binary file not shown.
Binary file modified dist/languages/azeri-lstin.klc
Binary file not shown.
Binary file modified dist/languages/bashkir.klc
Binary file not shown.
Binary file modified dist/languages/belgian.klc
Binary file not shown.
Binary file modified dist/languages/bengali.klc
Binary file not shown.
Binary file modified dist/languages/bosnian.klc
Binary file not shown.
Binary file modified dist/languages/bulgarian.klc
Binary file not shown.
Binary file modified dist/languages/croatian.klc
Binary file not shown.
Binary file modified dist/languages/czech-programmer.klc
Binary file not shown.
Binary file modified dist/languages/czech.klc
Binary file not shown.
Binary file modified dist/languages/danish.klc
Binary file not shown.
Binary file modified dist/languages/dutch.klc
Binary file not shown.
Binary file modified dist/languages/estonian.klc
Binary file not shown.
Binary file modified dist/languages/faeroese.klc
Binary file not shown.
Binary file modified dist/languages/finnish-sami.klc
Binary file not shown.
Binary file modified dist/languages/finnish.klc
Binary file not shown.
Binary file modified dist/languages/french.klc
Binary file not shown.
Binary file modified dist/languages/gaelic.klc
Binary file not shown.
Binary file modified dist/languages/georgian.klc
Binary file not shown.
Binary file modified dist/languages/german.klc
Binary file not shown.
Binary file modified dist/languages/greek.klc
Binary file not shown.
Binary file modified dist/languages/greenlandic.klc
Binary file not shown.
Binary file modified dist/languages/gujarati.klc
Binary file not shown.
Binary file modified dist/languages/hausa.klc
Binary file not shown.
Binary file modified dist/languages/hebrew.klc
Binary file not shown.
Binary file modified dist/languages/hindi.klc
Binary file not shown.
Binary file modified dist/languages/hungarian.klc
Binary file not shown.
Binary file modified dist/languages/icelandic.klc
Binary file not shown.
Binary file modified dist/languages/igbo.klc
Binary file not shown.
Binary file modified dist/languages/irish.klc
Binary file not shown.
Binary file modified dist/languages/italian.klc
Binary file not shown.
Binary file modified dist/languages/japanese-latin.klc
Binary file not shown.
Binary file modified dist/languages/kannada.klc
Binary file not shown.
Binary file modified dist/languages/kazakh.klc
Binary file not shown.
Binary file modified dist/languages/khmer.klc
Binary file not shown.
Binary file modified dist/languages/korean-latin.klc
Binary file not shown.
Binary file modified dist/languages/kyrgyz.klc
Binary file not shown.
Binary file modified dist/languages/lao.klc
Binary file not shown.
Binary file modified dist/languages/latvian.klc
Binary file not shown.
Binary file modified dist/languages/lithuanian.klc
Binary file not shown.
Binary file modified dist/languages/macedonian.klc
Binary file not shown.
Binary file modified dist/languages/malayalam.klc
Binary file not shown.
Binary file modified dist/languages/maltese.klc
Binary file not shown.
Binary file modified dist/languages/maori.klc
Binary file not shown.
Binary file modified dist/languages/marathi.klc
Binary file not shown.
Binary file modified dist/languages/mongolian.klc
Binary file not shown.
Binary file modified dist/languages/nepali.klc
Binary file not shown.
Binary file modified dist/languages/norwegian.klc
Binary file not shown.
Binary file modified dist/languages/oriya.klc
Binary file not shown.
Binary file modified dist/languages/pashto.klc
Binary file not shown.
Binary file modified dist/languages/persian.klc
Binary file not shown.
Binary file modified dist/languages/polish.klc
Binary file not shown.
Binary file modified dist/languages/portguese-brazil.klc
Binary file not shown.
Binary file modified dist/languages/portguese.klc
Binary file not shown.
Binary file modified dist/languages/punjabi.klc
Binary file not shown.
Binary file modified dist/languages/romanian.klc
Binary file not shown.
Binary file modified dist/languages/russian.klc
Binary file not shown.
Binary file modified dist/languages/serbian.klc
Binary file not shown.
Binary file modified dist/languages/sesotho-sa-leboa.klc
Binary file not shown.
Binary file modified dist/languages/setswana.klc
Binary file not shown.
Binary file modified dist/languages/sinhala.klc
Binary file not shown.
Binary file modified dist/languages/slovak.klc
Binary file not shown.
Binary file modified dist/languages/slovenian.klc
Binary file not shown.
Binary file modified dist/languages/sorbian.klc
Binary file not shown.
Binary file modified dist/languages/spanish.klc
Binary file not shown.
Binary file modified dist/languages/swedish.klc
Binary file not shown.
Binary file modified dist/languages/swiss-french.klc
Binary file not shown.
Binary file modified dist/languages/swiss-german.klc
Binary file not shown.
Binary file modified dist/languages/syriac.klc
Binary file not shown.
Binary file modified dist/languages/tajik.klc
Binary file not shown.
Binary file modified dist/languages/tamil.klc
Binary file not shown.
Binary file modified dist/languages/tatar.klc
Binary file not shown.
Binary file modified dist/languages/telugu.klc
Binary file not shown.
Binary file modified dist/languages/thai-kedmanee.klc
Binary file not shown.
Binary file modified dist/languages/thai-pattachote.klc
Binary file not shown.
Binary file modified dist/languages/tibetan.klc
Binary file not shown.
Binary file modified dist/languages/turkish-f.klc
Binary file not shown.
Binary file modified dist/languages/turkish-q.klc
Binary file not shown.
Binary file modified dist/languages/turkmen.klc
Binary file not shown.
Binary file modified dist/languages/uk.klc
Binary file not shown.
Binary file modified dist/languages/ukranian.klc
Binary file not shown.
Binary file modified dist/languages/urdu.klc
Binary file not shown.
Binary file modified dist/languages/us-dvorak.klc
Binary file not shown.
Binary file modified dist/languages/us.klc
Binary file not shown.
Binary file modified dist/languages/uyghur.klc
Binary file not shown.
Binary file modified dist/languages/uzbek.klc
Binary file not shown.
Binary file modified dist/languages/vietnamese.klc
Binary file not shown.
Binary file modified dist/languages/wolof.klc
Binary file not shown.
Binary file modified dist/languages/yakut.klc
Binary file not shown.
Binary file modified dist/languages/yoruba.klc
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

1,075 changes: 688 additions & 387 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mok-project",
"version": "1.1.5",
"version": "1.1.6",
"description": "A jQuery plugin providing multilingual onscreen keyboard for terminals and kiosks.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -28,12 +28,12 @@
},
"homepage": "https://github.com/srm985/mok-project#readme",
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.0",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"browser-sync": "^2.26.3",
"del": "^3.0.0",
"del": "^4.0.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^6.0.0",
"gulp-babel": "^8.0.0",
Expand All @@ -46,7 +46,8 @@
"gulp-sass": "^4.0.2",
"gulp-sass-lint": "^1.4.0",
"gulp-sequence": "^1.0.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-uglify": "^3.0.1"
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify": "^3.0.2",
"natives": "^1.1.6"
}
}
2 changes: 1 addition & 1 deletion src/demo/sample-keyboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script type="text/javascript">
$(document).ready(function () {
$(document).keyboard({
language: 'us:English, arabic:العَرَبِيَّة, vietnamese:tiếng Việt, hindi:हिन्दी',
language: 'azeri-latin, us:English, arabic:العَرَبِيَّة, vietnamese:tiếng Việt, hindi:हिन्दी',
enterKey: function () {
alert('Hey there! This is a callback function example.');
},
Expand Down
61 changes: 38 additions & 23 deletions src/js/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,42 @@
//* GitHub: https://github.com/srm985/mok-project *
//* *
//* Started: March 2017 *
//* Version: 1.1.3 *
//* Version: 1.1.6 *
//* *
//* License: MIT (https://opensource.org/licenses/MIT) *
//* *
//***********************************************************************************

$.fn.keyboard = function (passedOptions) {

var keyMap = { '29': 0, '02': 1, '03': 2, '04': 3, '05': 4, '06': 5, '07': 6, '08': 7, '09': 8, '0a': 9, '0b': 10, '0c': 11, '0d': 12, '10': 13, '11': 14, '12': 15, '13': 16, '14': 17, '15': 18, '16': 19, '17': 20, '18': 21, '19': 22, '1a': 23, '1b': 24, '2b': 25, '1e': 26, '1f': 27, '20': 28, '21': 29, '22': 30, '23': 31, '24': 32, '25': 33, '26': 34, '27': 35, '28': 36, '2c': 37, '2d': 38, '2e': 39, '2f': 40, '30': 41, '31': 42, '32': 43, '33': 44, '34': 45, '35': 46 },
keyStatusObject = { shift: false, caps: false, altgrp: false, shift_altgrp: '' },
pageElement = $(this),
focusedInputField,
resizeTimerActive = false,
languageArrayPosition = 0,
storedKeyboardObject = { keyboardFile: '', arrayPosition: '' },
shiftStateObject,
deadkeyObject,
ligatureObject,
deadkeyPressed = '',
deadkeySet = false,
textFlowDirection = 'LTR',
keyboardOpen = false,
keyboardWrapperPresent = false,
inputFieldType = 'text',
keyboardInputType = 'text',
keyboardStreamField;

const KEYBOARD_VERSION = '1.1.5';
const rtlLanguages = [
'ar-SA',
'fa-IR',
'he-IL',
'ur-PK'
];

let keyMap = { '29': 0, '02': 1, '03': 2, '04': 3, '05': 4, '06': 5, '07': 6, '08': 7, '09': 8, '0a': 9, '0b': 10, '0c': 11, '0d': 12, '10': 13, '11': 14, '12': 15, '13': 16, '14': 17, '15': 18, '16': 19, '17': 20, '18': 21, '19': 22, '1a': 23, '1b': 24, '2b': 25, '1e': 26, '1f': 27, '20': 28, '21': 29, '22': 30, '23': 31, '24': 32, '25': 33, '26': 34, '27': 35, '28': 36, '2c': 37, '2d': 38, '2e': 39, '2f': 40, '30': 41, '31': 42, '32': 43, '33': 44, '34': 45, '35': 46 };

let deadkeyObject;
let deadkeyPressed = '';
let deadkeySet = false;
let focusedInputField;
let inputFieldType = 'text';
let keyStatusObject = { shift: false, caps: false, altgrp: false, shift_altgrp: '' };
let keyboardInputType = 'text';
let keyboardOpen = false;
let keyboardStreamField;
let keyboardWrapperPresent = false;
let languageArrayPosition = 0;
let ligatureObject;
let localeName = '';
let pageElement = $(this);
let resizeTimerActive = false;
let shiftStateObject;
let storedKeyboardObject = { keyboardFile: '', arrayPosition: '' };
let textFlowDirection = 'LTR';

const KEYBOARD_VERSION = '1.1.6';
const LANGUAGE_KEY_DEFAULT = 'Language';
const LANGUAGE_MAP_SPLIT_CHAR = ':';
const TRIGGER_KEYBOARD_FLAG = 'triggerKeyboard';
Expand Down Expand Up @@ -322,6 +330,13 @@ $.fn.keyboard = function (passedOptions) {
data = data.replace(/\u0000/g, '');
keyData = data.match(/\d(\w)?\s+\w+\s+\d\s+(-1|\w+@?|%%)\s+(-1|\w+@?|%%)\s+(-1|\w+@?|%%)(\s+(-1|\w+@?|%%))?(\s+(-1|\w+@?|%%))?(\s+(-1|\w+@?|%%))?\s+\/\//g);

const [
extractedLocaleName
] = data.match(/LOCALENAME\s+".*"/);

// Storing our locale name so that we can set certain language attributes.
localeName = extractedLocaleName.replace(/LOCALENAME\s+"(.*)"/, '$1');

//*****Extract our shift state data and convert to lookup table.*****
shiftStateLocation = data.indexOf('SHIFTSTATE');
if (shiftStateLocation > 0) {
Expand Down Expand Up @@ -385,7 +400,7 @@ $.fn.keyboard = function (passedOptions) {
}

//*****Reverse input direction for specific languages.*****
if (file == 'arabic') {
if (rtlLanguages.includes(localeName)) {
textFlowDirection = 'RTL';
} else {
textFlowDirection = 'LTR';
Expand Down
1 change: 1 addition & 0 deletions src/languages/-language-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
25 Apr 17 17.33 16,110 albanian.klc
25 Apr 17 17.33 11,466 arabic.klc
29 Apr 17 19.52 11,888 azeri-cyrillic.klc
02 Apr 19 19.52 10,952 azeri-latin.klc
29 Apr 17 19.52 10,952 azeri-lstin.klc
29 Apr 17 19.53 12,262 bashkir.klc
25 Apr 17 17.33 10,500 belarusian.klc
Expand Down
Binary file modified src/languages/arabic.klc
Binary file not shown.
Binary file modified src/languages/azeri-cyrillic.klc
Binary file not shown.
Binary file added src/languages/azeri-latin.klc
Binary file not shown.
Binary file modified src/languages/azeri-lstin.klc
Binary file not shown.
Binary file modified src/languages/bashkir.klc
Binary file not shown.
Binary file modified src/languages/belgian.klc
Binary file not shown.
Binary file modified src/languages/bengali.klc
Binary file not shown.
Binary file modified src/languages/bosnian.klc
Binary file not shown.
Binary file modified src/languages/bulgarian.klc
Binary file not shown.
Binary file modified src/languages/croatian.klc
Binary file not shown.
Binary file modified src/languages/czech-programmer.klc
Binary file not shown.
Binary file modified src/languages/czech.klc
Binary file not shown.
Binary file modified src/languages/danish.klc
Binary file not shown.
Binary file modified src/languages/dutch.klc
Binary file not shown.
Binary file modified src/languages/estonian.klc
Binary file not shown.
Binary file modified src/languages/faeroese.klc
Binary file not shown.
Binary file modified src/languages/finnish-sami.klc
Binary file not shown.
Binary file modified src/languages/finnish.klc
Binary file not shown.
Binary file modified src/languages/french.klc
Binary file not shown.
Binary file modified src/languages/gaelic.klc
Binary file not shown.
Binary file modified src/languages/georgian.klc
Binary file not shown.
Binary file modified src/languages/german.klc
Binary file not shown.
Binary file modified src/languages/greek.klc
Binary file not shown.
Binary file modified src/languages/greenlandic.klc
Binary file not shown.
Binary file modified src/languages/gujarati.klc
Binary file not shown.
Binary file modified src/languages/hausa.klc
Binary file not shown.
Binary file modified src/languages/hebrew.klc
Binary file not shown.
Binary file modified src/languages/hindi.klc
Binary file not shown.
Binary file modified src/languages/hungarian.klc
Binary file not shown.
Binary file modified src/languages/icelandic.klc
Binary file not shown.
Binary file modified src/languages/igbo.klc
Binary file not shown.
Binary file modified src/languages/irish.klc
Binary file not shown.
Binary file modified src/languages/italian.klc
Binary file not shown.
Binary file modified src/languages/japanese-latin.klc
Binary file not shown.
Binary file modified src/languages/kannada.klc
Binary file not shown.
Binary file modified src/languages/kazakh.klc
Binary file not shown.
Binary file modified src/languages/khmer.klc
Binary file not shown.
Binary file modified src/languages/korean-latin.klc
Binary file not shown.
Binary file modified src/languages/kyrgyz.klc
Binary file not shown.
Binary file modified src/languages/lao.klc
Binary file not shown.
Binary file modified src/languages/latvian.klc
Binary file not shown.
Binary file modified src/languages/lithuanian.klc
Binary file not shown.
Binary file modified src/languages/macedonian.klc
Binary file not shown.
Binary file modified src/languages/malayalam.klc
Binary file not shown.
Binary file modified src/languages/maltese.klc
Binary file not shown.
Binary file modified src/languages/maori.klc
Binary file not shown.
Binary file modified src/languages/marathi.klc
Binary file not shown.
Binary file modified src/languages/mongolian.klc
Binary file not shown.
Binary file modified src/languages/nepali.klc
Binary file not shown.
Binary file modified src/languages/norwegian.klc
Binary file not shown.
Binary file modified src/languages/oriya.klc
Binary file not shown.
Binary file modified src/languages/pashto.klc
Binary file not shown.
Binary file modified src/languages/persian.klc
Binary file not shown.
Binary file modified src/languages/polish.klc
Binary file not shown.
Binary file modified src/languages/portguese-brazil.klc
Binary file not shown.
Binary file modified src/languages/portguese.klc
Binary file not shown.
Binary file modified src/languages/punjabi.klc
Binary file not shown.
Binary file modified src/languages/romanian.klc
Binary file not shown.
Binary file modified src/languages/russian.klc
Binary file not shown.
Binary file modified src/languages/serbian.klc
Binary file not shown.
Binary file modified src/languages/sesotho-sa-leboa.klc
Binary file not shown.
Binary file modified src/languages/setswana.klc
Binary file not shown.
Binary file modified src/languages/sinhala.klc
Binary file not shown.
Binary file modified src/languages/slovak.klc
Binary file not shown.
Binary file modified src/languages/slovenian.klc
Binary file not shown.
Binary file modified src/languages/sorbian.klc
Binary file not shown.
Binary file modified src/languages/spanish.klc
Binary file not shown.
Binary file modified src/languages/swedish.klc
Binary file not shown.
Binary file modified src/languages/swiss-french.klc
Binary file not shown.
Binary file modified src/languages/swiss-german.klc
Binary file not shown.
Binary file modified src/languages/syriac.klc
Binary file not shown.
Binary file modified src/languages/tajik.klc
Binary file not shown.
Binary file modified src/languages/tamil.klc
Binary file not shown.
Binary file modified src/languages/tatar.klc
Binary file not shown.
Binary file modified src/languages/telugu.klc
Binary file not shown.
Binary file modified src/languages/thai-kedmanee.klc
Binary file not shown.
Binary file modified src/languages/thai-pattachote.klc
Binary file not shown.
Binary file modified src/languages/tibetan.klc
Binary file not shown.
Binary file modified src/languages/turkish-f.klc
Binary file not shown.
Binary file modified src/languages/turkish-q.klc
Binary file not shown.
Binary file modified src/languages/turkmen.klc
Binary file not shown.
Binary file modified src/languages/uk.klc
Binary file not shown.
Binary file modified src/languages/ukranian.klc
Binary file not shown.
Binary file modified src/languages/urdu.klc
Binary file not shown.
Binary file modified src/languages/us-dvorak.klc
Binary file not shown.
Binary file modified src/languages/us.klc
Binary file not shown.
Binary file modified src/languages/uyghur.klc
Binary file not shown.
Binary file modified src/languages/uzbek.klc
Binary file not shown.
Binary file modified src/languages/vietnamese.klc
Binary file not shown.
Binary file modified src/languages/wolof.klc
Binary file not shown.
Binary file modified src/languages/yakut.klc
Binary file not shown.
Binary file modified src/languages/yoruba.klc
Binary file not shown.

0 comments on commit 8fe9e7d

Please sign in to comment.