From mint-bounce@lists.fishpool.fi Wed Dec 9 21:43:40 2009 Message-ID: <4B205F34.20801@atari-source.org> Date: Wed, 09 Dec 2009 21:38:44 -0500 From: Mark Duckworth User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Jo Even Skarstein CC: "mint@lists.fishpool.fi" Subject: Re: [MiNT] Greek keyboard table References: <4da966f00912020651m256cac55lde2e66430a659e04@mail.gmail.com> <4da966f00912070602ifc2db2br70711d0544be3971@mail.gmail.com> <1260195721.20336.180.camel@jetpack.demon.co.uk> <4B1D1AE0.5080107@freesbee.fr> <1260199449.20336.181.camel@jetpack.demon.co.uk> <11a6f2b10912072156w40b89686g6066e365c2508451@mail.gmail.com> <4B1E9B53.6050600@online.no> <4da966f00912081132t32228f4au2916bc4f3aac7ab0@mail.gmail.com> <4B1FF3E6.9030201@online.no> In-Reply-To: <4B1FF3E6.9030201@online.no> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mduckworth@atari-source.org Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Jo Even Skarstein wrote: > Helmut Karlowski skreiv: > >>> it will be nice to have the dead key function. >> >> Which one shall this be? I thought of ALT+', ALT+^, etc, but that >> would also not be very convenient. > > Deadkeys should not be linked to a specific key or key combo, but to > an ASCII value. It can be done something like this in the end of > scan2asc() (or whatever it's called - the function in keyboard.c that > converts scancodes to ASCII) (pseudocode): > > /* ascii is the resulting ascii code after looking it up in the > keyboard table. */ > > if last_deadkey > { > if ascii in deadkey_base_characters(last_deadkey) /* E.g. o */ > ascii = deadkey_accented_characters(last_deadkey, ascii) /* E.g ô */ > else > ascii = last_deadkey > > last_deadkey = '\0' > } > else if ascii in deadkeys /* E.g ^ */ > { > last_deadkey = ascii > ascii = '\0' > } > > return ascii > > So if you set the character '^' to be a deadkey, then any key or > key-combo that returns ^ from the ordinary keyboard table will be a > deadkey. If a valid "base character" for this deadkey is pressed next, > it's corresponding accented character will be returned. E.g. ^ + o = > ô. If deadkey is followed by an invalid base character, the deadkey is > returned. > > The deadkey-tables can follow the current tables, and the format can > be simple: > > deadkey character, basecharacter, accented character, base character, > accented character, '\0' > > I don't think it has to be more complicated than this. > > Jo Even > > I had an atari tool that did this. CKBD? Thanks, Mark