Foros


Comfort Software :: Foros :: Development
<< Tema anterior | Tema siguiente >>   

How to manipulate the on-screen keyboard from HTML

Autor Mensaje
Comfort
Wed May 14 2008, 12:55PM


Unido: Wed Sep 19 2007, 03:42PM
Mensajes: 617
If you are writing kiosk software using HTML, you can control the on-screen keyboard with special JavaScript functions.

You can show, hide and move the keyboard using JavaScript. The process is simple: special JavaScript functions add keyboard-related information to the browser caption and the program monitors it for changes.

Download the file with JavaScript functions and examples located at http://www.comfort-software.com/commander.html

These functions work in all well-known browsers: Internet Explorer, Firefox, Google Chrome, Opera, Safari...

[ Editado Thu Apr 28 2011, 01:33PM ]

Have a nice day
Volver arriba
Barbetto80
Tue May 27 2008, 09:40AM
Miembro registrado #116
Unido: Tue May 27 2008, 09:24AM
Mensajes: 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?

Volver arriba
Barbetto80
Tue May 27 2008, 10:30AM
Miembro registrado #116
Unido: Tue May 27 2008, 09:24AM
Mensajes: 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>

[ Editado Mon Dec 14 2009, 09:22AM ]
Volver arriba
Comfort
Tue May 27 2008, 02:17PM


Unido: Wed Sep 19 2007, 03:42PM
Mensajes: 617
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
Volver arriba
TheLandYacht
Tue Feb 03 2009, 03:57PM
Miembro registrado #249
Unido: Tue Feb 03 2009, 03:55PM
Mensajes: 2
Tried your example. It works like a champ in Internet Explorer, but Firefox does nothing. Can you confirm?
Volver arriba
Comfort
Wed Feb 04 2009, 12:32AM


Unido: Wed Sep 19 2007, 03:42PM
Mensajes: 617
What code don't work: http://www.comfort-software.com/download/keyboardx.zip or from Barbetto80?

Have a nice day
Volver arriba
TheLandYacht
Sat Feb 07 2009, 06:18PM
Miembro registrado #249
Unido: Tue Feb 03 2009, 03:55PM
Mensajes: 2
Comfort escribió ...

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.
Volver arriba
Comfort
Thu Feb 12 2009, 01:07AM


Unido: Wed Sep 19 2007, 03:42PM
Mensajes: 617
OCX and ActiveX elements work only with IE, and nothing else.
http://support.mozilla.com/kb/Activex

Have a nice day
Volver arriba
Moderadores: Comfort

Saltar:     Volver arriba

Sindicalizar este hilo: rss 0.92 Sindicalizar este hilo: rss 2.0 Sindicalizar este hilo: RDF
Powered by e107 Forum System