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:33:15 +0100

I'd just like to add, that this seems to have to do with german keyboard
layout. As far as I remember, there is no need to use Alt key on english
layout.
When I bind those Alt-keys, then I can't use the regular keys anymore.
For example on german layout @ is Alt key of the key q. | is Alt + < and so
on.
I hope this helps.

Am 26.02.2017 21:24 schrieb "cryo shock" <axteffekt.att.gmail.com>:

> 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:33:15 EST

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