View Single Post
Old 06-05-2010, 02:31 AM   #1270
m-land
Enthusiast
m-land has learned how to buy an e-book online
 
Posts: 41
Karma: 86
Join Date: Jul 2009
Device: PRS-505
Virtual keyboard

I prepared pre-alfa release of virtual keyboard. It is rather 'proof of concept'. Should be placed in addon directory.
files:
xDictionaryCL.js - only slightly modified DictionaryCL - simply to allow my test be started, I was lazy to write my own or modify this one well.
kb.* - implementation of testing application
other files - keyboard implementation

All this info could be read from sources, just to see what to look for:
Keyboard implementation:
-one line (view tag) in kb.xml
-switching on/off in kb.xml
-keyboard output handling functions

keyboard definition is quite simple (I'll put sample here). My idea is, that in the future keyboard definitions could be in files in special directory (similar to addons). Digits definition keyboard (example):
Code:
kbdList.push(new kbdDefinition('Digits','123', [
    ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']
]));
Keyboard 'public' methods
kbdActivate - switch keyboard on/off

Handling functions:
doKbdInput - user enters his input. Normally keyboard will be deactivated in 'user code' after this (not in my sample)
doKbdProgress - writing progress (single letter callback). Usually will not be implemented in user code (rare usage)
doKbdCancel - keyboard was deactivated by user

keyboard buttons
digits - row/column letter selection. Row 0 is allways for keyboard switching
center - send input to user code (doKbdInput)
mark - backspace
markhold - clear input
menu - doKbdCancel (deactivates keyboard)

sample code buttons
left/right - deactivates/activates keyboard
menu - exit

What is missing
A lot Main things are:
-there is 'status line' in keyboard - just for my debugging now
-visual aspects (a little of graphics)
-selected row (first digit) visual feedback
-resizing of keyboard when switched
-keyboards config in PRS+ (not topic now)

I'd be glad if PRS+ developers could take a look to this and give me some feedback:
-if it is in direction they expected
-comments, requirements (if so)

Marek
Attached Files
File Type: zip vKeyboard.zip (11.9 KB, 204 views)
m-land is offline   Reply With Quote