And this code snipped taken form PRS 600 kbook.so let me hope that this can be done.
Code:
this.Fskin.kbookKeyboard.keyboard.addLetter = function (obj, text, code) {
var event, words, container, wlen, strExisted, candidate, idx;
if (this.field) {
event = new <global>.Event(2048);
if (!code) {
code = text.charCodeAt(0);
}
if (this.numberOnly) {
words = this.field.getValue();
if (words && words == '0') {
if (code == 48) {
return;
}
if (48 + 1 <= code && code <= 48 + 9) {
event.key = '';
event.keyCode = 8;
this.field.keyDown(event);
}
}
}
event.key = text;
event.keyCode = code;
this.field.keyDown(event);
container = this.container;
if ('sandbox' in container && 'updatePageNo' in container.sandbox) {
container.sandbox.updatePageNo();
}
words = this.field.getValue();
if (this.numberOnly) {
wlen = (words)?words.length:0;
strExisted = (wlen > 0)?true:false;
this.updateBtn(strExisted, this.strModified, false);
}
else {
candidate = this.candidate;
if (candidate) {
idx = this.field.getSelectionOffset();
candidate.makeCandidate(words, idx);
}
}
}
};