Parallels Desktop® 10 for Mac — C API Reference Guide
|
Sends a keyboard key event to a virtual machine.
PRL_RESULT PrlDevKeyboard_SendKeyEvent( PRL_HANDLE hVm, PRL_UINT32 key, PRL_KEY_EVENT ev );
PrlApiVm.h
PRL_RESULT . Possible values:
PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.
PRL_ERR_SUCCESS - function completed successfully.
To send a single key-pressed event, first call this function passing the desired key code and PKE_PRESS as the event type. Then call the function again passing the same key code and PKE_RELEASE as the event type. To send a key combination event, first call the function passing the code of the first key (usually a modifier key, such as Ctrl, Shift, Alt) and PKE_PRESS as the event type. Then call the function passing the code of the second key with PKE_PRESS. Continue with other keys (if more than two). Then call the function in reverse order for each key passing PKE_RELEASE as the event type.
Copyright © 1999-2015 Parallels IP Holdings GmbH and its affiliates. All rights reserved.
|
What do you think about this topic?
Send feedback!
|