Contents

Introducing Comfort Keys
Version Comparison
Why do you particularly need Comfort Keys?
How to buy Comfort Keys
How to use Comfort Keys
Keyboard Shortcuts Settings
Working with Template Manager
Working with Clipboard Manager
Using the on-screen keyboard
Controlling the input language
Customizing the keyboard type
Editing templates
Template macros
Editing shortcut icons
Action types
Run a program; open a document or a folder
Open one or several Internet resources
Paste text
Play a keystroke macro
Connect/Disconnect from a network
Comfort Keys actions
Show Clipboard Manager
Paste text from Templates
Open the task switching window showing open documents and running applications
Show the keyboard shortcuts settings window
Show/Hide On-Screen Keyboard
Show the list of recently launched programs
Show the desktop with hot keys
Activate the next keyboard shortcuts file
Audio control
Monitor control
Window control
Perform a system action
Change the language or case
Lock/Restart/Shutdown
Block key or shortcut
Replace key or shortcut
Options
Main Properties
Themes
Keyboard Shortcuts
On-Screen Keyboard
Clipboard Manager
Template Manager
Word Autocomplete
Language Switcher
Shortcut icons
Task Switching Window
Process History Window
Exceptions
Advanced
Other issues
FAQ - Frequently asked questions
License Agreement
Contact information
Development
Show, close, fade or move the On-Screen Keyboard
How to restrict access
How to activate different keyboards

 
Home
Comfort Keys Web Online Help
Prev Page Next Page
 
 
Show, close, fade or move the On-Screen Keyboard
return to introduction  previous page  next page
You can use Window Messages to manipulate the on-screen keyboard.

Like this:

WM_CSKEYBOARD = WM_USER + 192;
WM_CSKEYBOARDMOVE = WM_USER + 193;

// to show keyboard
PostMessage(FindWindow('TFirstForm', 'CKeyboardFirstForm'), WM_CSKEYBOARD, 1, 0);

// to close keyboard
PostMessage(FindWindow('TFirstForm', 'CKeyboardFirstForm'), WM_CSKEYBOARD, 2, 0);

// to fade keyboard
PostMessage(FindWindow('TFirstForm', 'CKeyboardFirstForm'), WM_CSKEYBOARD, 3, 0);

// to toggle (show/hide) keyboard
PostMessage(FindWindow('TFirstForm', 'CKeyboardFirstForm'), WM_CSKEYBOARD, 4, 0);

// to move keyboard (Left, Top - new position)
PostMessage(FindWindow('TFirstForm', 'CKeyboardFirstForm'), WM_CSKEYBOARDMOVE, Left, Top);


For Visual Basic, it looks like this:

Private Const WM_CSKEYBOARD = WM_USER + 192
Private Const WM_CSKEYBOARDMOVE = WM_USER + 193

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

'Code to show keyboard
Dim hWnd As Long
hWnd = FindWindow("TFirstForm", "CKeyboardFirstForm")
PostMessage hWnd, WM_CSKEYBOARD, 1, 0

'Code to close keyboard
Dim hWnd As Long
hWnd = FindWindow("TFirstForm", "CKeyboardFirstForm")
PostMessage hWnd, WM_CSKEYBOARD, 2, 0

'Code to move keyboard
Dim hWnd As Long
hWnd = FindWindow("TFirstForm", "CKeyboardFirstForm")
PostMessage hWnd, WM_CSKEYBOARDMOVE, 0, 0


Here is the code in C#

public const Int32 WM_USER = 1024;
public const Int32 WM_CSKEYBOARD = WM_USER + 192;
public const Int32 WM_CSKEYBOARDMOVE = WM_USER + 193;

[DllImport("user32.dll", EntryPoint = "FindWindow")]
private static extern Int32 FindWindow(string _ClassName, string _WindowName);

[DllImport("User32.DLL")]
public static extern Boolean PostMessage(Int32 hWnd, Int32 Msg, Int32 wParam, Int32 lParam);


Int32 hWnd = FindWindow("TFirstForm", "CKeyboardFirstForm");
PostMessage(hWnd, WM_CSKEYBOARD, 1, 0 ); // Show
PostMessage(hWnd, WM_CSKEYBOARD, 2, 0); // Hide
PostMessage(hWnd, WM_CSKEYBOARDMOVE, 0, 0); // Move to 0, 0


If you are writing kiosk software using HTML, you can manipulate the on-screen keyboard with via an 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 hidekb.html, hidekeyboard.html, showkb.html and showkeyboard.html

For example, you want the keyboard to be shown on a single html page and not the whole site/kiosk. In this case, use the code from the "showkb.html" file for a single page and the code from "hidekb.html" for other pages.


Visit Comfort Keys web-site
Converted from CHM to HTML with chm2web Pro 2.75 (unicode)