John Fortin <[EMAIL PROTECTED]> writes:

> All,
> 
>     As I worked on the windows port, I discovered that Direct Input
> returns keyboard scan codes.  Since I don't want to reinvent the wheel (
> too much anyway!!),

Hmm, are you sure that there isn't any function in the win32 API to
convert scancodes to keysymbols/unicode/whatever? Would be strange
if there wasn't.

> what is the best, most common, or least complicated
> way to map a standard US keyboard. I suppose this also includes key
> modifiers such as shift, control, and alt.

For targets that can only produce scancodes I suggest we keep it
simple - make the inputlib only convert scancodes to GII labels
according to US keymapping, keep track of modifier state, and set
the sym field to the same as the label field. This is enough to 
make most (all current) games as well as XGGI to work.

Then we write a filter which will do real keymapping according to
a config-file (filter-keyboard is a bit too generic for doing a full
keyboard map, and should be kept that way), and generated events
with prober sym fields.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: [EMAIL PROTECTED]

Reply via email to