Quoting Miro Kropacek <miro.kropacek@gmail.com>:
if it isn't in the hypertext doc, you must look for source file which implements this function -- I was programming with CFLib a lot, it's totally easy to understand. So from the sources you can see that function is a wrapper for NKCC's function for some keyboard code conversion but I was lazy to study that asm source. But it's clear it takes some keyboard code and state (maybe from event loop, hence "gem_to") and outputs some other code, dunno, it depends on what purpose that NKCC library has.
Yes I guessed it's a wrapper for an nkcc function. QED passes kstate and kreturn, it's just not clear what they represent. I think it returns a GEM key code converted to "standard". Digging into source code is so time consuming for every function when a few comments in the function header would make things clear. Peter