Hello Michael,
If you have created the keyboard from the provided templates, the keyboard already contains code to feed the application with keyboard events. In other cases, you can feed the events by using the method DriveKeyboardHitting() invoked in context of the root object. This method expects the code representing the pressed key or character and the associated state information: pressed or released.
For example, every time the user touches a key in your virtual keyboard, you can execute following code:
var Core::KeyCode keyCode = Core::KeyCode.NoKey;
var char charCode = '\0';
// The user has pressed a special key (not a character key). For example
// the ENTER key:
if ( ... )
keyCode = Core::KeyCode.Enter;
// The user has pressed character key (e.g. 'A')
if ( ... )
charCode = 'A';
// Simulate the pressure and release of the affected key
GetRoot().DriveKeyboardHitting( keyCode, charCode, true );
GetRoot().DriveKeyboardHitting( keyCode, charCode, false );
Please note, DriveKeyboardHitting() expects the parameters keyCode and charCode to be provided exclusively. If you provide keyCode then charCode has to be '\0'. If you provide charCode, then keyCode has to be Core::KeyCode.NoKey.
Hope it helps you further.
Best regards
Paul Banach