How to simulate keyboard event like Ctrl+A in scim?



Hi all,
I want to develop an scim softkeyboard program, but I don't know how to simulate the keyevent like Ctrl+A, I do like this but failed:

/* press ctrl */
KeyEvent  key = KeyEvent(SCIM_KEY_Control_L, SCIM_KEY_NullMask);
m_agent->send_key_event(cur_ic, cur_uuid, key);

/* ctrl+c */
key = KeyEvent(SCIM_KEY_c, SCIM_KEY_ControlMask);
KeyEvent  key_release = KeyEvent(SCIM_KEY_c, SCIM_KEY_ReleaseMask);
m_agent->send_key_event(cur_ic, cur_uuid, key);
m_agent->send_key_event(cur_ic, cur_uuid, key_release);


/*release ctrl*/
key_release = KeyEvent(SCIM_KEY_Control_L, SCIM_KEY_ReleaseMask);

need help.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]