lkml.org 
[lkml]   [1996]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: KDGKBENT
>: OK, sorry.  I'm writing a universal keyboard library, which will sit on top
>: of the linux console, X, or some random terminal and tell the program very
>: specifically what key was pressed (vaguely like X's interface, but structured
>: for more versatility.) It natively supports all of ISO-10646 (even portions
>: outside the BMP), so I would like to be able to read a full keymap from
>: the kernel and then switch into VC_MEDIUMRAW mode to use it as well as
>: possible. Of course I can go into VC_UNICODE mode to read the keymap, but
>: that strikes me as a silly requirement. The keyboard map doesn't depend
>: on the mode, so why should the version of it exported to userspace via
>: the GD[GS]KBENT ioctls?
>
>Well, the keyboard map does depend on the mode - at least conceptually.
>The parts of the keymap that are invisible when you are not in VC_UNICODE
>mode are precisely the parts that generate UTF-8 code, which is probably
>meaningless to a non-Unicode-aware application.

Yeah, that makes sense.

>(And indeed, one might argue that there should be a test for VC_UNICODE
>before UTF-8 is generated; if I recall correctly, I left the test in a comment,
>since it is ugly to generate error messages from the keyboard driver.)
>Since your application is Unicode-aware, it takes only one ioctl to tell
>that to the kernel.

OK, I'll just go ahead and do that--the library already saves the keyboard
mode anyway so that it can restore it from VC_MEDIUMRAW mode. I really
didn't intend for this to become such a big deal, BTW; I was just asking
for the motivation for the check in the ioctl because it didn't seem
completely logical at first.

Also BTW: the library will be LGPLed; although I'm not sure when it'll
be ready (my schedule's a tad busy for at least the next 6 weeks), I'd love
to have you alpha test it when I get to that stage (if you wouldn't mind,
that is).

-- Aaron Ucko (ucko@vax1.rockhurst.edu; finger for PGP public key) | httyp!
"That's right," he said. "We're philosophers. We think, therefore we am."
-- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger
hayden@mankato.msus.edu]: GCS/M/S/C d- s: a18 C++(+++)>++++ UL++>++++ P++
L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+)
!5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.036 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site