TVK is a virtual keyboard for the Thai language written for the QT GUI toolkit in C++ (QT versions 3 and 4).

TVK is used in Sontana and is intended to be used by other software developers in their own programs.

The virtual keyboard is resizable and includes all Thai letters, even the rarely used komut, fongman, pintu, yamakan, angkanku and nikhahit; as defined by TIS 620-2533/UniCode 3.

TVK is very flexible with respect to size. You can resize to almost any aspect with any font size. It would be very easy to use in a kiosk type computer with touch screen.


Using TVK

Simply point and click on the keyboard.

For Mac, use the command key instead of CTRL in the above examples.

How To Use In Your Own Software

The widget allows text to be input by clicking on a keyboard. The key is highlighted when you click on it. The widget emits a signal corresponding to the TIS-620 code for the letter, it's up to you to make a suitable slot. TVK does not include any composition; it is up to the programmer to ensure that input is correct for WTT (run anywhere) specification.

A test program is included for you to verify the basic behaviour. The class emits the signal void KeyPressed(int tis620val) where tis620val is the TIS-620 coding of the letter. For action keys like tab, enter and delete the ASCII code is emitted.

This is all the code you need:

// Declare the keyboard widget
ThaiVirtualKeyboard *tvk = new ThaiVirtualKeyboard;
// Connect the keyboard widget to the editing widget
connect(tvk, SIGNAL(KeyPressed(int)), myEditWidget, SLOT(insertCharacter(int)));
/// Show the keyboard on screen