Closed C-Entropy closed 3 years ago
Would be nice to leave a solution or comment for closing, for anyone having a similar question later.
Here is my sloution to get key-press and key-release:
((:key-release) (window sequence code x y state time root root-x root-y child same-screen-p)
(list 3 code sequence time root window child root-x root-y x y state same-screen-p)))
((:key-press) (window sequence code x y state time root root-x root-y child same-screen-p)
(list 2 code sequence time root window child root-x root-y x y state same-screen-p)));;you may find the order of them from xlib/xorg document.
and then convert the list to corresponding binary. It is kind of silly, I think the be better solution is to dig into source code of clx, but for me, this can work.
If you have better solutions, please let me know.
I have to forward event to another x client, how do I get the raw envet? For example, the
xcb_key_press_event_t
, I try to generate it usingBut I don't know how to get
uint16_t sequence;
andxcb_window_t event;