Click here to Skip to main content
15,892,298 members
Articles / Web Development / HTML

JavaScript Virtual Keyboard

Rate me:
Please Sign up or sign in to vote.
4.91/5 (181 votes)
30 Mar 2008CPOL20 min read 1.2M   23.6K   323  
This article presents a Virtual Keyboard - an important addendum to the library of usability tools.
This file explains how to compress the Virtual Keyboard script with ESC
(EcmaScript Cruncher, http://www.saltstorm.net/depo/esc/) if you've
made changes to the original script and want to compress (and obfuscate) it.

The following procedure applies to full script (vkboard.js) and slim
variant of the script (vkboards.js). For other two variants, steps 3, 4 and 6
should be omitted.

1. In the archive with the ESC.wsf you'll find the 'bless.map.dynapi' file.
   Copy it to the same directory where ESC.wsf is; rename it to 'bless.map'
   and append the following items to the end of the file:

Show
ShowNumpad
avail_langs
Us_normal
Us_caps
Us_shift
Us_alt_gr
Us_alt_gr_shift
Ca_normal
Ca_caps
Ca_shift
Ca_alt_gr
Ru_normal
Ru_caps
Ru_shift
De_normal
De_caps
De_shift
De_alt_gr
Fr_normal
Fr_caps
Fr_shift
Fr_alt_gr
Es_normal
Es_caps
Es_shift
Es_alt_gr
It_normal
It_caps
It_shift
It_alt_gr
It_alt_gr_shift
Cz_normal
Cz_caps
Cz_shift
Cz_alt_gr
El_normal
El_caps
El_shift
El_alt_gr
He_normal
He_shift
He_alt_gr
Acute
Breve
Caron
Cedilla
Circumflex
DialytikaTonos
DotAbove
DoubleAcute
Grave
Ogonek
RingAbove
Tilde
Umlaut

  Note 1: as you see in the above list, it contains all the bundled
  layouts. If you don't use any of them, you should omit it; if you
  use additional layouts, you must add them to the above list.

  Note 2: If you wish to use compressed script with the translator setup
 (see '3-edit-translator.html'), then you must additionally append
  this line:

     _refresh_layout

2. Cut legal (disclaimer) part, and save it to another file (e.g. 'legal.txt').

3. Compress 'vkboard.js' to 'vkboardc.js' with level of compression of 4:

     cscript ESC.wsf -l 4 -ow vkboardc.js vkboard.js

4. Restore the disclaimer (from 'legal.txt') at the start of the script.
   Don't forget to mention changes you've made and the tool you've used
   for compression.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Freelance software engineer
Russian Federation Russian Federation
Dmitry Khudorozhkov began programming (and gaming) with his ZX Spectrum in 1989. Having seen and used all IBM PCs from early XT to the latest x64 machines, now Dmitry is a freelance programmer, living in Moscow, Russia. He is a graduate of the Moscow State Institute of Electronics and Mathematics (Applied Mathematics).

He is proficient in:

- C/C++ - more that 9 years of experience. Pure Win32 API/MFC desktop programming, networking (BSD/Win sockets), databases (primarily SQLite), OpenGL;

- JavaScript - more that 6 years of experience. Client-side components, AJAX, jQuery installation and customization;

- Firefox extensions (immediatelly ready for addons.mozilla.org reviewing) and Greasemonkey scripts. As an example of extensions Dmitry made you can search for FoxyPrices or WhatBird Winged Toolbar;

- XML and it's applications (last 2 years): XSLT (+ XPath), XSD, SVG, VML;

- ASP.NET/C# (webservices mostly);

Also familiar with (= entry level):

- PHP;

- HTML/CSS slicing.

Trying to learn:

- Ruby/Ruby-on-Rails;

- Czech language.

If you wish to express your opinion, ask a question or report a bug, feel free to e-mail:dmitrykhudorozhkov@yahoo.com. Job offers are warmly welcome.

If you wish to donate - and, by doing so, support further development - you can send Dmitry a bonus through the Rentacoder.com service (registration is free, Paypal is supported). Russian users can donate to the Yandex.Money account 41001132298694.

-

Comments and Discussions