This is actually a coding question.
I know that the X server checks the active keyboard layout to figure out which character (supporting unicode) to emit. But I don't actually know how this is done, could someone point me to the source code where I can see this in action?
What I want to actually do is to create a "unicode keyboard driver" which can do the same thing (ignoring the active layout), but then I need to know how X is emitting the unicode character to the GUI.
Even if I need to add new functionality to the X server and recompile it that's okay. I just want to be pointed to the right source code for emitting those characters into the GUI.
EDIT:
The comments pushed me in good directions on where to find answers. I think I've now figured out how I can programmatically output unicode text into GUI's on Linux.
Hints: xdotool / libxdo, XTestFakeKeyEvent, xmodmap -e "keycode 107 = U2196"
I will see if I can eventually answer this question with my own C++ library to do this.