From Ubuntu docs about the Compose key at https://help.ubuntu.com/community/ComposeKey:

The compose key sequences used by Gnome are derived from the X compose tables of XFree86 version 4.0 with further modifications to provide a Gnome standard for all locales. They are hard coded into the program in source file gtk+-2.10.7/gtk/gtkimcontextsimple.c

Digging into the current Debian gtk+ source verifies this:

`
/* This file contains the table of the compose sequences,

  • static const guint16 gtk_compose_seqs_compact[] = {}
  • IT is generated from the compose-parse.py script.
    */
    #include “gtkimcontextsimpleseqs.h”
    `

So they start with the X Input Method layer which has nice unixy text config files (check out /usr/share/X11/locale) and they want to extend it with some extra sequences. What’s the best way to do that? Clearly snarf what’s already there, bolt on your own bits and hardcode the lot into your binary.

Well done, chaps.