logo

/Virtual Keyboard|v2.1.3

Class

new VirtualKeyboard(container, options)virtualKeyboard.jsline 57

A virtual keyboard component is capturing kyes that is typed from user.

PARAMETERS
NameTypeDescription

container

jQueryElementstring

Wrapper element or id selector

options

object

PROPERTIES
NameTypeDescription

keyType

string

Type of keyboard

keys

array

Index of normal keys

functions

object

Index of function keys

template

object

Template set for all keys

callback

object

Callback set for all keys

isClickOnly

boolean

Whether the touch event is ignored or not

usageStatistics

Boolean = true|false

send hostname to google analytics default value is true

EXAMPLES
var container = document.getElementById('virtual-keyboard');
var VirtualKeyboard = tui.VirtualKeyboard; // or require('tui-virtual-keyboard');
var instance = new VirtualKeyboard(container, {
     keyType: 'number',
     keys: ['9', '3', '5', '1', '', '7', '0', '2', '4', '6', '8', ''],
     functions: {
         shuffle: 0,
         language: 2,
         caps: 3,
         symbol: 4,
         remove: 5,
         clear: 9,
         space: 10,
         close: 11,
         done: 20
     },
     template: {
         key: '<li class="subcon"><span class="btn_key"><button type="button">{KEY}</button></span></li>',
         blank: '<li class="subcon"><span class="btn_key"></span></li>',
         shuffle: '<li class="subcon"><span class="btn btn_reload"><button type="button" value="shuffle">재배열</button></span></li>',
         remove: '<li class="subcon last"><span class="btn btn_del"><button type="button" value="remove"><span class="sp">삭제</span></button></span></li>'
     },
     callback: {
         key: function() {
         },
         getKeys: function() {
         },
         remove: function() {
         }
     },
     isClickOnly: false
});

Instance Methods

caps()virtualKeyboard.jsline 600

Change upper/lower case

EXAMPLES
instance.caps();

close()virtualKeyboard.jsline 654

Close virtual keyboard

EXAMPLES
instance.close();

language()virtualKeyboard.jsline 588

Toggle Eng/Kor

EXAMPLES
instance.language();

open()virtualKeyboard.jsline 644

Open virtual keyboard

EXAMPLES
instance.open();

shuffle()virtualKeyboard.jsline 576

Shuffle keys.

EXAMPLES
instance.shuffle();

symbol()virtualKeyboard.jsline 611

Change symbol/number keys

EXAMPLES
instance.symbol();
Resizable