The keyboard is handled in src/cmd/devdraw which could be considered
the plan9port
equivalent of the Plan 9 kernel (at least the keyboard, mouse, and
graphics part).

The X11 version of devdraw maps the X notion of a keyboard to the Plan 9 one in
__xtoplan9kbd (src/cmd/devdraw/x11-itrans.c).
In particular, this function contains,

        /* Do control mapping ourselves if translator doesn't */
        if(e->xkey.state&ControlMask && k != Kalt)
                k &= 0x9f;

So, for instance, Ctrl-[0Pp] all map to 0x10.

Not sure what the convention should be, but that's where it's enforced.

Eoghan

Reply via email to