Re: key commands for keys below 255

From: anton <averbit....at.yandex.ru>
Date: Mon, 30 May 2011 15:43:40 -0700 (PDT)

On 26 Mai, 12:36, Robert <ro....at.web.de> wrote:
> On Wed, May 25, 2011 at 2:36 PM, mitchell <c....at.caladbolg.net> wrote:
> > Hi,
>
> > On May 24, 7:13ápm, anton <averbit....at.yandex.ru> wrote:
> >> Hi all,
>
> >> I've just started to use TA and I really enjoy exploring it.
>
> >> I want to ask for help in a small technical problem
>
> >> in order to assign a command to a key with value higher than 255
> >> one proceeds as follows
> >> 1. Add this value to áKEYSYMS table in
> >> á ácore/keys.lua
> >> (one can look it up herehttp://git.gnome.org/browse/gtk+/plain/gdk/gdkkeysyms.h
> >> and use for instance wolframalpha to convert to decimal )
> >> 2 Add a command to this key in keys table in
> >> á modules/textadept/keys.lua.
>
> >> Somehow this seems not to work with keys values below 255 (like «,š or
> >> ▀, for instance).
> >> Direct ways like keys['«'] ádon't help either.
>
> > Keys below 256 are converted to text via Lua's string.char() function.
> > Values larger than 127 are probably locale-dependent.
>
> > mitchell
>
> Mitchell
> so could this be changed to values below 128?
>
> Anton,
> you can add to KEYSYMS in your init.lua, it's not recommended to edit
> core/keys.lua as it would get overwritten with the next update.
>
> Robert

I simply added
[string.char(231)] = { latex_compile }
and it works flawlessly.

Actually, this thing about string.char() can be found in keys module
documentation
(but not in the source code of core/keys.lua where I was looking for
it). Sorry.

Please add TextAdept to freshmeat. I found TA by googling "text editor
lua". Maybe there are
people out there desperately looking for a good simple extensible
editor but who have never heard about lua. Give them a chance.
Received on Mon 30 May 2011 - 18:43:40 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:09:15 EST