Re: [code] [textadept] How to setup textadept to compile ConTeXt on Windows10x64? / TA strange behaviour

From: cryo shock <axteffekt.att.gmail.com>
Date: Sun, 26 Feb 2017 21:24:46 +0100

Well, now I know how to assign ascii commands to text buffers. Yet I am
experiencing another issue.
Some keys have the same numeric value. For example I added 113 to the text
buffer '@'. But then I can't use the q key anymore. Same counts for '|'.
When I bind it, then I can't use the element < anymore. It seems that my
virtual keyboard sends the same ascii adress for the elements which are
typed by using Alt key.

Do you think there is a way how to handle this? As far as I know, SciTE and
textadept are made with the same language. Since in SciTE everything works
fine I am sure there has to be a way how to solve this.

Any help is greatly apreciated.
Cheers, Sebastian

Am 26.02.2017 14:59 schrieb "cryo shock" <axteffekt.att.gmail.com>:

> Thanks Mitchell. Your last code did the trick. Now it works.
>
> Am 26.02.2017 3:54 vorm. schrieb "Mitchell" <m.att.foicica.com>:
>
>> Hi,
>>
>> On Sat, 25 Feb 2017, cryo shock wrote:
>>
>> I did as you described, copy pasted your code to init.lua. But there is no
>>> change. I still can't use the backslash...
>>>
>>
>> That's odd, the key binding should have kicked in if the '\' key produces
>> the code 223. Try this event handler instead:
>>
>> events.connect(events.KEYPRESS, function(code)
>> if code == 223 then
>> buffer:add_text('\\')
>> return true
>> end
>> end
>>
>> Cheers,
>> Mitchell
>>
>>
>>> Am 25.02.2017 7:14 nachm. schrieb "Mitchell" <m.att.foicica.com>:
>>>
>>> Hi,
>>>>
>>>> On Sat, 25 Feb 2017, cryo shock wrote:
>>>>
>>>> Thanks for your quick response Mitchell,
>>>>
>>>>>
>>>>> I will try your solution a little later, when I have more time. Thanks
>>>>> for
>>>>> that.
>>>>>
>>>>> I did as you asked for the backslash problem, and indeed TA gives me a
>>>>> numeric code: 223
>>>>>
>>>>>
>>>> Okay, since it's not the expected 92, you'll have to set up a custom
>>>> keybinding in your *init.lua*:
>>>>
>>>> keys['\223'] = function() buffer:add_text('\\') end
>>>>
>>>> For more documentation on keys:
>>>> http://foicica.com/textadept/api.html#keys
>>>>
>>>> Cheers,
>>>> Mitchell
>>>> --
>>>> 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.
>>>>
>>>>
>>>>
>>>
>> Mitchell
>> --
>> 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.
>>
>>

-- 
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 Sun 26 Feb 2017 - 15:24:46 EST

This archive was generated by hypermail 2.2.0 : Mon 27 Feb 2017 - 06:30:36 EST