Here's an excerpt from xev output from me typing "¤xo", which is to say, Compose x o x o. What you can see from this:
- The keystrokes eaten by the Compose key still appear as KeyPress and KeyRelease events. They just have XFilterEvent=True on the KeyPress events. The other keystrokes (and the KeyRelease events) have XFilterEvent=False.
- The ¤ character is injected as a fake KeyPress, with keycode 0 and a keysym corresponding to the actual Unicode code point. I tried ☺ later; the corresponding keysym is keysym 0x100263a, U263A.
- I believe that all of this compose-key hackery is being done by Xlib, not by the X server, because you have to start a new X client in order to get it to notice changes to
.XCompose
.
PropertyNotify event, serial 30, synthetic NO, window 0x6800001,
atom 0x19d (_NET_WM_ICON_GEOMETRY), time 1774437600, state PropertyNewValue
KeyPress event, serial 30, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774438429, (682,734), root:(684,814),
state 0x0, keycode 108 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyRelease event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774438582, (682,734), root:(684,814),
state 0x0, keycode 108 (keysym 0xff20, Multi_key), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774439060, (682,734), root:(684,814),
state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: True
KeyRelease event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774439180, (682,734), root:(684,814),
state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774440190, (682,734), root:(684,814),
state 0x0, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XmbLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: True
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774440190, (682,734), root:(684,814),
state 0x0, keycode 0 (keysym 0xa4, currency), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 2 bytes: (c2 a4) "¤"
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774440290, (682,734), root:(684,814),
state 0x0, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774446494, (682,734), root:(684,814),
state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774446608, (682,734), root:(684,814),
state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774446835, (682,734), root:(684,814),
state 0x0, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XmbLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774446975, (682,734), root:(684,814),
state 0x0, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6800001,
root 0xb3, subw 0x0, time 1774447384, (682,734), root:(684,814),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 33, synthetic NO, window 0x6800001,
mode NotifyGrab, detail NotifyAncestor
ClientMessage event, serial 33, synthetic YES, window 0x6800001,
message_type 0x118 (WM_PROTOCOLS), format 32, message 0x116 (WM_DELETE_WINDOW)