From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <80c99e790912070613g1caffb63m7c09e0530f687a95@mail.gmail.com> Date: Mon, 7 Dec 2009 12:10:50 -0500 Message-ID: From: Eoghan Sherry To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] keyboard events in sam Topicbox-Message-UUID: ac1fe688-ead5-11e9-9d60-3106f5b1d025 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