[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] New AES keyboard messages



On Fri, 2005-04-01 at 08:03 +0200, Adam Kłobukowski wrote:

You need aditional condition, and fiddling with bits and stuff. With 
returning scancodes we do exactly the same thing, no matter what key was 
pressed.

Uhmm .. how is this different? 

>>2. If we ever would want to add support for non-atari keyboards, we 
>>could run out of options
> 
> If you have a keyboard with more than 256 keys, its going to break the
> existing evnt_multi() and evnt_keybd() as well.

Well, more thatn 256 keys on a single keyboard is hard to find, I agree. 
But most modern keyboards these days has some multimedia keys, or just 
power on/off keys, and that do not fit very well into ascii.

As a ompromise we could return dwo words: a scancode in first, ascci +
modifiers in 2nd, how do that sound?

Well, I think what you are saying is this:

Method Adam:
  *  New version of evnt_multi with additional parameters but mostly redundant code
  *  Returns the same information, but handles 16 bit scancodes

Method Evan:
  *  Completely backwards compatible, no new calls, only a new event type
  *  Limited to 256 scan codes.  Typical PC keyboards have 105 keys.  Leaving 151 unused scancodes.

I think whenever you have to change an API, you make the programmer responsible for either picking which API they want to use, or making them responsible for correctly determining which APIs are available and providing the proper fallbacks and workarounds.

How much variance of the API can such a relatively small developer base handle?   And is it really necessary to code a new API to handle hardware that doesn't currently exist, won't exist under any platform for quite a long time (multimedia keys and such use a sequence of scancodes, which the OS doesn't necessarily give directly to applications) especially when no new hardware is currently in development now or in the foreseeable future?