
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comfort Software :: Forums :: Development | |||
|
|||
How to manipulate the on-screen keyboard from HTML |
| Author | Post |
| Comfort |
| ||
![]() ![]() ![]() Joined: Wed Sep 19 2007, 03:42pm Posts: 438 | 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, 09:29am ] Have a nice day | ||
| Back to top |
| Barbetto80 |
| ||
![]() Joined: Tue May 27 2008, 09:24am Posts: 5 | 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? ![]() | ||
| Back to top |
| Barbetto80 |
| ||
![]() Joined: Tue May 27 2008, 09:24am Posts: 5 | ps my workaround if useful: <span id='int_tsc' style='position:absolute;top:-100px;left-100px;'></span> <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> [ Edited Mon Dec 14 2009, 09:22am ] | ||
| Back to top |
| Comfort |
| ||
![]() ![]() ![]() Joined: Wed Sep 19 2007, 03:42pm Posts: 438 | 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 |
| TheLandYacht |
| ||
![]() Joined: Tue Feb 03 2009, 03:55pm Posts: 2 | Tried your example. It works like a champ in Internet Explorer, but Firefox does nothing. Can you confirm? | ||
| Back to top |
| Comfort |
| ||
![]() ![]() ![]() Joined: Wed Sep 19 2007, 03:42pm Posts: 438 | What code don't work: http://www.comfort-software.com/download/keyboardx.zip or from Barbetto80? Have a nice day | ||
| Back to top |
| TheLandYacht |
| ||
![]() Joined: Tue Feb 03 2009, 03:55pm Posts: 2 | Comfort wrote ... What code don't work: http://www.comfort-software.com/download/keyboardx.zip or from Barbetto80? Sorry, didn't realize there was a difference, didn't even look at the example pasted in. Starting from your link in the first post. IE works fine, FF (most recent version) does not. | ||
| Back to top |
| Comfort |
| ||
![]() ![]() ![]() Joined: Wed Sep 19 2007, 03:42pm Posts: 438 | OCX and ActiveX elements work only with IE, and nothing else. http://support.mozilla.com/kb/Activex Have a nice day | ||
| Back to top |
| Moderators: Comfort |