[code] Re: [textadept] Events based on keys

From: Richard Philips <richard.philips.att.gmail.com>
Date: Thu, 1 May 2014 16:39:29 +0200

Hi Mitchell,

It is not so easy to explain what I want to accomplish.

In fact, what I want to do is something specific for one keychain (that is
easily done) and something for ALL OTHER keychains.

But how do I describe all other keychains ?

In the example:
As long as the keychain is CTRL + SHIFT + DEL, I accumulate all erased data

From the moment another keychain is entered, the accumulation process
stops.
I know exactly what I have to do, the only thing missing is catching the
event that keychain is NOT ctrl + shift + del

In fact, the example I am describing here is something from the Emacs world
(they call it the kill ring).

I hope I make it somewhat clearer :-)

Richard

On Thursday, May 1, 2014, Mitchell <m.att.foicica.com> wrote:

> Hi Richard,
>
> On Thu, 1 May 2014, Richard Philips wrote:
>
> Hi,
>>
>> events.KEYPRESS allows for handling events based on keypresses.
>>
>> I would like to handle events based on key chains.
>> I know you can easily connect a function to a specific key chain. But I
>> would like to connect to a function with the key chain as argument.
>>
>> Example:
>>
>> CTRL + SHIFT + DEL deletes until the end of the line. I would like to put
>> the deleted text in the clipboard. (I accomplished this without a
>> problem).
>>
>> Repeated CTRL+SHIFT+DEL should add to the clipboard.
>>
>> Any pointers on how to handle this?
>>
>
> If I'm understanding your question correctly, I think you should simply
> define your own function that encapsulates the functionality of an existing
> key, and then rebind to that key/keychain.
>
> 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.
>
>

-- 
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 Thu 01 May 2014 - 10:39:29 EDT

This archive was generated by hypermail 2.2.0 : Fri 02 May 2014 - 06:52:29 EDT