Re: [AD] More Unix patches |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Shawn Hargreaves <shawn@xxxxxxxxxx> writes:
> For keyboard
> input, there are routines to handle a keypress and keyrelease, where you
> give it the ASCII code and Allegro-format scancode. Alternatively you can
> pass the input to the routines in pckeys.c, which takes input in the
> keyboard controller hardware format, and passes it on to the generic
> handlers in keyboard.c after doing all the table conversions, but it will
> probably be easier for you to ignore that and just go straight to the
> keyboard.c routines.
I'm not sure what functions to use. X-server generates KeyPress and
KeyRelease events with keycodes in the range [8,255]. In
XwinAllegro keycodes were converted to the keyboard controller
hardware format (sequence of scancodes) which was processed similar to
DOS version (now this sequence can be processed with _handle_pckeys).
I don't think that processing with functions from keyboard.c can be as
simple as with _handle_pckeys function. AFAICS, it will be necessary
to calculate ASCII values and scancodes according to state of modifier
keys. But maybe I'm wrong here?
--
Michael Bukin