Re: [code] Greek accented characters

From: Robert Gieseke <rob.g.att.web.de>
Date: Fri, 29 Nov 2013 16:19:03 +0100

Hi.

Am 11/29/13, 4:02 PM, schrieb Mitchell:
>> In order to type accented characters with the greek keyboard you need to
>> press the ; key and then the letter. When I press the ; key I get the
>> square I was talking about.
>
> It sounds like toolkit Textadept uses, GTK, is not interpreting ';' as a
> "dead-key", but instead as an insertable key. Is there another way to
> compose accented characters with the Alt/Option key?

It's also the same in Gedit.app, another GTK-based editor. It might be
possible to enable the multipress Greek keyboard layout by placing the
right Compose files in the right location [1, 2], but I don't know
enough about GTK.

>
> I presume if you type into a native OSX app like TextView.app, ';'
> accents characters and you can copy-paste those accented characters into
> Textadept without them showing up as squares?
>

Copy and paste works fine. I don't know which OS version changed this
but I have an 'Special characters' item in the Edit view from which I
can drag and drop.

Alternatively, one might be able to create a Greek keyboard mode within
Textadept.

The following snippet shows this for two keys:

keys.greek = {
   ['a'] = {buffer.add_text, 'α'},
   ['s'] = {buffer.add_text, 'σ'},
   [';'] = {
     ['a'] = {buffer.add_text, 'ά'},
   },
   ['f4'] = function()
     keys.MODE = nil
   end
}
keys['f4'] = function() keys.MODE = 'greek' end
events.connect(events.UPDATE_UI, function()
   if keys.MODE ~= 'greek' then return end
   ui.statusbar_text = 'Greek mode'
end)

Use F4 to switch between Greek and standard mode, in Greek mode,
pressing 'a' or 's' inserts 'α' or 'σ'. The semicolon starts a key chain
to insert 'ά'.
It would of course be some work to create all necessary (accented)
chars. This could of course be simplified by looping over a string of
chars to include.

- Robert

[1] http://simos.info/blog/archives/639
[2] http://ubuntuforums.org/showthread.php?t=939767

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 29 Nov 2013 - 10:19:03 EST

This archive was generated by hypermail 2.2.0 : Sat 30 Nov 2013 - 06:44:49 EST