From mint-bounce@lists.fishpool.fi Sat Dec 12 17:04:32 2009 Message-ID: <4B2412E5.1030603@online.no> Date: Sat, 12 Dec 2009 23:02:13 +0100 From: Jo Even Skarstein User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "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: joska@online.no Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Jo Even Skarstein skreiv: > 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. As an experiment I implemented this tonight, but just with some hardcoded deadkeys instead of tables. It works as expected, so if there is any interest I will implement this properly. Jo Even