Forums


Comfort Software :: Forums :: Development
<< Previous thread | Next thread >>   

How to manipulate the on-screen keyboard from HTML

Author Post
Comfort
Wed May 14 2008, 09:55AM


Joined: Wed Sep 19 2007, 12:42PM
Posts: 98
If you are writing kiosk software with using HTML, you can manipulate the on-screen keyboard via ActiveX component.

1. Download the file with ActiveX components and examples located at http://www.comfort-software.com/download/keyboardx.zip .
2. Install ActiveX with using the following command: "regsvr32 cskeyboard.ocx" (or run the registerocx.cmd file).
3. See examples from files hidekb.html, hidekeyboard.html, showkb.html, showkeyboard.html

For example, the keyboard could automatically appear in a fixed position on the required page and automatically disappear on the other pages. To do this, use the code from "showkb.html" for one page and the code from "hidekb.html" for other pages.

[ Edited Mon May 26 2008, 06:29AM ]

Have a nice day
Back to top
Barbetto80
Tue May 27 2008, 06:40AM
Registered Member #116
Joined: Tue May 27 2008, 06:24AM
Posts: 2
Hi, i have seen your implementation for html page to load/unload the software.

It would be good if the open/close of the virtual keyboard could be called via javascript using the same classid....so that when you have a web page,

1) when you click on a text you should make it appear (onfocus)
2) and when you click somewhere else it disappear (onblur)

by now i only make a workaround by rewriting the pbject all tha time but this is just a workaround..

maybe you can implement 2 simple call in your activex to /show /notshow the program?

[br]
Back to top
Barbetto80
Tue May 27 2008, 07:30AM
Registered Member #116
Joined: Tue May 27 2008, 06:24AM
Posts: 2
ps my workaround if useful:

<script>
var tsc_sh=\"<OBJECT ID='CsShowKeyboardFormX1' WIDTH=0 HEIGHT=0 \";
tsc_sh+=\"CLASSID='CLSID:90B8E669-2EE4-47BC-B7C9-C0CB5C80A86E' \";
tsc_sh+=\"CODEBASE='http://www.comfort-software.com/keyboard/cskeyboard.ocx'> \";
tsc_sh+=\"<PARAM NAME='Visible' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='AutoScroll' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='AutoSize' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='AxBorderStyle' VALUE='1'> \";
tsc_sh+=\"<PARAM NAME='Caption' VALUE='Comfort On-Screen Keyboard Panel'> \";
tsc_sh+=\"<PARAM NAME='Color' VALUE='4278190095'> \";
tsc_sh+=\"<PARAM NAME='Font' VALUE='Tahoma'> \";
tsc_sh+=\"<PARAM NAME='KeyPreview' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='PixelsPerInch' VALUE='96'> \";
tsc_sh+=\"<PARAM NAME='PrintScale' VALUE='1'> \";
tsc_sh+=\"<PARAM NAME='Scaled' VALUE='-1'> \";
tsc_sh+=\"<PARAM NAME='DropTarget' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='HelpFile' VALUE=''> \";
tsc_sh+=\"<PARAM NAME='PopupMode' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='ScreenSnap' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='SnapBuffer' VALUE='10'> \";
tsc_sh+=\"<PARAM NAME='DockSite' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='DoubleBuffered' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='UseDockManager' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='Enabled' VALUE='0'> \";
tsc_sh+=\"<PARAM NAME='AlignWithMargins' VALUE='0'> \";
tsc_sh+=\"</OBJECT>\";

var tsc_hi=\"<OBJECT ID='CsShowKeyboardFormX1' WIDTH=0 HEIGHT=0 \";
tsc_hi+=\"CLASSID='CLSID:9D571E34-3146-471F-B148-2AC0989BC7A4' \";
tsc_hi+=\"CODEBASE='http://www.comfort-software.com/keyboard/cskeyboard.ocx'> \";
tsc_hi+=\"<PARAM NAME='Visible' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='AutoScroll' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='AutoSize' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='AxBorderStyle' VALUE='1'> \";
tsc_hi+=\"<PARAM NAME='Caption' VALUE='Comfort On-Screen Keyboard Panel'> \";
tsc_hi+=\"<PARAM NAME='Color' VALUE='4278190095'> \";
tsc_hi+=\"<PARAM NAME='Font' VALUE='Tahoma'> \";
tsc_hi+=\"<PARAM NAME='KeyPreview' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='PixelsPerInch' VALUE='96'> \";
tsc_hi+=\"<PARAM NAME='PrintScale' VALUE='1'> \";
tsc_hi+=\"<PARAM NAME='Scaled' VALUE='-1'> \";
tsc_hi+=\"<PARAM NAME='DropTarget' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='HelpFile' VALUE=''> \";
tsc_hi+=\"<PARAM NAME='PopupMode' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='ScreenSnap' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='SnapBuffer' VALUE='10'> \";
tsc_hi+=\"<PARAM NAME='DockSite' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='DoubleBuffered' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='UseDockManager' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='Enabled' VALUE='0'> \";
tsc_hi+=\"<PARAM NAME='AlignWithMargins' VALUE='0'> \";
tsc_hi+=\"</OBJECT>\";

function show_tsc() {
document.getElementById('int_tsc').innerHTML=tsc_sh;
}
function hide_tsc() {
document.getElementById('int_tsc').innerHTML=tsc_hi;
}
</script>
Back to top
Comfort
Tue May 27 2008, 11:17AM


Joined: Wed Sep 19 2007, 12:42PM
Posts: 98
I cannot give an answer at once.
Maybe it will be useful to check a new option "Show the floating On-Screen Keyboard icon next to the text cursor when possible"?

Have a nice day
Back to top
Moderators: Comfort

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System