Issue #99: generatekeyevent should send events to the system.

Sending keyboard events to the system is the best way of simulating user
interaction via keyboard. System is dispatching the evenets to the
focused application.

Sometimes focused application may not be the front most application.
Just to be consistent with other api's return 1 on success ? It doesn't make sense here, as the failure scenarios were not handled and it will raise exception...