// get the virtual cursor
iVirtualCursor = &(env->VirtualCursor());
// and turn it on
By default, move and drag events are not delivered to the client. They can be enabled by setting the event filter with RWindowBase::PointerFilter(). E.g. when using a window-owning control object (derived from CCoeControl):
This enables move and drag events for window owned by the control. Events of type TPointerEvent::EMove and TPointerEvent::EDrag and delivered to the client, and can be handled in the control's HandlePointerEventL() function.
The control must also claim a pointer grab. Without pointer grab, pointer events are delivered to it only between EButton1Down (within that control) and EButton1Up events.
If virtual cursor with move/drag events does not match your needs, it is possible to use pointer cursor and drive it with keyboard events. Diagonal movement can be achieved by checking the status of multiple keys and handling key events of type EEventKeyUp and EEventKeyDown.