From mint-bounce@lists.fishpool.fi  Sat Apr  2 13:31:10 2005
X-Original-To: fnaumann@mail.boerde.de
Delivered-To: fnaumann@mail.boerde.de
Subject: Re: [MiNT] New AES keyboard messages
From: "Evan K. Langlois" <Evan@CoolRunningConcepts.com>
To: Petr Stehlik <joy@sophics.cz>
Cc: Adam =?iso-8859-2?Q?K=B3obukowski?= <atari@gabo.pl>,
        MiNT <mint@fishpool.com>
In-Reply-To: <1112433659.6687.2.camel@joy.home>
References: <1111344400.12169.50.camel@taro.coolrunningconcepts.com>
	 <424B0943.3000706@gabo.pl>
	 <1112242300.10960.20.camel@taro.coolrunningconcepts.com>
	 <424B8F47.7040803@gabo.pl>
	 <1112294969.24071.20.camel@taro.coolrunningconcepts.com>
	 <424C65AA.9070900@gabo.pl>  <1112344790.25198.39.camel@joy.sophics>
	 <1112394317.28763.13.camel@taro.coolrunningconcepts.com>
	 <1112433659.6687.2.camel@joy.home>
Content-Type: multipart/alternative; boundary="=-uH4vLSdmXLdqlpl4E8Kt"
Organization: Cool Running Concepts
Date: Sat, 02 Apr 2005 05:09:29 -0600
Message-Id: <1112440170.28763.84.camel@taro.coolrunningconcepts.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.0.3 
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - esc14.midphase.com
X-AntiAbuse: Original Domain - fishpool.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - CoolRunningConcepts.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-To: mint-bounce@lists.fishpool.fi
X-original-sender: Evan@CoolRunningConcepts.com
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
X-Virus-Scanned: by amavisd-new at relay.boerde.de
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de
X-Spam-Status: No, hits=-0.9 tagged_above=-50.5 required=7.0 tests=AWL,
 BAYES_00, HTML_MESSAGE
X-Spam-Level: 


--=-uH4vLSdmXLdqlpl4E8Kt
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable

Hi Peter,

By "intelligent scancodes" - I assume you mean simply changing whatever
the keyboard driver returns into the english keyboard equivalent for
better compatibility?   I can see a couple variations on that:

If, for example, the Z key generates a different scancode on the German
keyboard than on a US keyboard, should the Z key scancode be translated?
If so, should the existing keyboard events, and not just the new event
for Key-Up/Key-Down, have this translated as well (currently there is no
translation), and will that break any compatibility with either existing
apps, or having different events return differnt scan-codes?
Personally, I don't think it will be a problem to translate, as long as
the new event for key-up/key-down is consistent with the returned
scan-codes for all AES calls.

The real question was if a move to 16 bit scan-codes is a good idea.  I
don't see the point if its not consistent with the existing AES calls.
Currently the AES returns the key pressed in a 16 bit word with the
scan-code in the upper 8 bits and the ascii code in the lower 8 bits.
The ascii code is translated through the keyboard translation tables
(can be queried or changed through Keytbl()
and is dependent on modifier keys and keyboard language) but the
scan-code is raw.  The ascii value will be 0 if there is no ascii value
for that key, and the programmer can then look at the scancode to
determine which function key or undo/help/home or whatever was pressed.

A few people are calling me idiots for being against a 16 bit scan-code,
but I don't know where the extra 8 bits are going to be returned without
breaking something, nor do I ever see a keyboard with more than 255 keys
- I wouldn't buy one!  No one has yet told me where this extra 8 bits is
going to come from, or why a 16 bit scan-code is a good idea.

With that logic, I could argue that we make scancodes a full 32 bits,
and the ascii values as well.  We can make the low 16 bits of the ascii
portion UNICODE compatible, and the rest is in case we move to a full 32
bit character set.  And the VDI (NDC) coordinate system ... 32Kx32K
won't cut it for long .. maybe 64 bit floats so it scales accurately to
new resolutions and very high resolution displays.   Displays will hit
resolutions of more than 32767 pixels across before you see a keyboard
with more than 255 keys, IMHO.

On Sat, 2005-04-02 at 11:20 +0200, Petr Stehlik wrote:

> Evan K. Langlois p=ED=B9e v P=E1 01. 04. 2005 v 16:25 -0600:
> > > > My idea is to return rather scancodes then ascii codes. Not raw=20
> > > > scancodes - it should be inteligent enough to send the same code fo=
r=20
> > > > (for example) Z key, no matter what keyboard (German, UK, US) is us=
ed.
> > >=20
> > > This doesn't sound like a good idea to me.  You'll want to stick with
> > > pure scancodes and to provide a function for conversion from scancode=
 to
> > > ASCII code...
> >=20
> > The AES normally returns both.
>=20
> I haven't followed the proposed extension in detail so I don't know if
> it was supposed to return ASCII value as well. My main point was that
> there is nothing like "intelligent scancodes" that would take the
> keyboard layout into account.
>=20
> Petr
>=20
>=20
>=20
>=20
>=20

--=-uH4vLSdmXLdqlpl4E8Kt
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.2.4">
</HEAD>
<BODY>
Hi Peter,<BR>
<BR>
By &quot;intelligent scancodes&quot; - I assume you mean simply changing whatever the keyboard driver returns into the english keyboard equivalent for better compatibility?&nbsp;&nbsp; I can see a couple variations on that:<BR>
<BR>
If, for example, the Z key generates a different scancode on the German keyboard than on a US keyboard, should the Z key scancode be translated?&nbsp;&nbsp; If so, should the existing keyboard events, and not just the new event for Key-Up/Key-Down, have this translated as well (currently there is no translation), and will that break any compatibility with either existing apps, or having different events return differnt scan-codes?&nbsp; Personally, I don't think it will be a problem to translate, as long as the new event for key-up/key-down is consistent with the returned scan-codes for all AES calls.<BR>
<BR>
The real question was if a move to 16 bit scan-codes is a good idea.&nbsp; I don't see the point if its not consistent with the existing AES calls.&nbsp; Currently the AES returns the key pressed in a 16 bit word with the scan-code in the upper 8 bits and the ascii code in the lower 8 bits.&nbsp; The ascii code is translated through the keyboard translation tables (can be queried or changed through Keytbl()<BR>
and is dependent on modifier keys and keyboard language) but the scan-code is raw.&nbsp; The ascii value will be 0 if there is no ascii value for that key, and the programmer can then look at the scancode to determine which function key or undo/help/home or whatever was pressed.<BR>
<BR>
A few people are calling me idiots for being against a 16 bit scan-code, but I don't know where the extra 8 bits are going to be returned without breaking something, nor do I ever see a keyboard with more than 255 keys - I wouldn't buy one!&nbsp; No one has yet told me where this extra 8 bits is going to come from, or why a 16 bit scan-code is a good idea.<BR>
<BR>
With that logic, I could argue that we make scancodes a full 32 bits, and the ascii values as well.&nbsp; We can make the low 16 bits of the ascii portion UNICODE compatible, and the rest is in case we move to a full 32 bit character set.&nbsp; And the VDI (NDC) coordinate system ... 32Kx32K won't cut it for long .. maybe 64 bit floats so it scales accurately to new resolutions and very high resolution displays.&nbsp;&nbsp; Displays will hit resolutions of more than 32767 pixels across before you see a keyboard with more than 255 keys, IMHO.<BR>
<BR>
On Sat, 2005-04-02 at 11:20 +0200, Petr Stehlik wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Evan K. Langlois p&#237;&#353;e v P&#225; 01. 04. 2005 v 16:25 -0600:</FONT>
<FONT COLOR="#000000">&gt; &gt; &gt; My idea is to return rather scancodes then ascii codes. Not raw </FONT>
<FONT COLOR="#000000">&gt; &gt; &gt; scancodes - it should be inteligent enough to send the same code for </FONT>
<FONT COLOR="#000000">&gt; &gt; &gt; (for example) Z key, no matter what keyboard (German, UK, US) is used.</FONT>
<FONT COLOR="#000000">&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt; &gt; This doesn't sound like a good idea to me.  You'll want to stick with</FONT>
<FONT COLOR="#000000">&gt; &gt; pure scancodes and to provide a function for conversion from scancode to</FONT>
<FONT COLOR="#000000">&gt; &gt; ASCII code...</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; The AES normally returns both.</FONT>

<FONT COLOR="#000000">I haven't followed the proposed extension in detail so I don't know if</FONT>
<FONT COLOR="#000000">it was supposed to return ASCII value as well. My main point was that</FONT>
<FONT COLOR="#000000">there is nothing like &quot;intelligent scancodes&quot; that would take the</FONT>
<FONT COLOR="#000000">keyboard layout into account.</FONT>

<FONT COLOR="#000000">Petr</FONT>





</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-uH4vLSdmXLdqlpl4E8Kt--


