USpeak: Difference between revisions
No edit summary |
|||
| Line 113: | Line 113: | ||
<code> | <code> | ||
XGetInputFocus(...); //to focus to the window. | XGetInputFocus(...); //to focus to the window. | ||
// Create the event | // Create the event | ||
XKeyEvent event = createKeyEvent(...); | XKeyEvent event = createKeyEvent(...); | ||
// Send the KEYCODE. We can define these using XK_ constasnts | // Send the KEYCODE. We can define these using XK_ constasnts | ||
XSendEvent(...); | XSendEvent(...); | ||
// Resend the event to emulate the key release | // Resend the event to emulate the key release | ||
event = createKeyEvent(...); | event = createKeyEvent(...); | ||