Re: KeyConfig, KeyBinding and other related issues.

Saimadhav Heblikar <[email protected]>
Newsgroups gmane.comp.python.idle
Message-ID <CAO3PiBh_vs=wfsKje2UQGfsrhSpyE74-=THRsgDkDKo_DKkHyQ@mail.gmail.com>
On 13 June 2014 16:58, Tal Einat <[email protected]> wrote:
> On Fri, Jun 13, 2014 at 2:22 PM, Saimadhav Heblikar
> <[email protected]> wrote:
>> Just a heads up to both: I am writing a keyseq validator method.
>> It currently works for over 800 permutations of ['Shift', 'Control',
>> 'Alt', 'Meta', 'Key-a', 'Key-A', 'Up', 'Key-Up', 'a', 'A']. It works
>> for permutations of length 2 and 3. Beyond that its not worth it IMO.
>> I am currently trying to integrate it with test_configuration.py and
>> catching permutations i missed out.
>>
>> I post this, so that we dont duplicate work. I hope it to be ready by
>> the end of the day.(UTC +5.5)
>
> What is the method you are using?

Regex. It is not something elegant. The permutations are coded in.(Not
all 800+ obviously, but around 15-20 general ones.). The only
advantage is it can be used without creating a new Tk instance.


>
> What do you mean by "permutations"? If you mean what I think, then I'm
> not sure I agree with >3 not being worth it. I've used keyboard
> bindings with more than 2 modifiers before, and we should certainly
> support this properly.
>
I am sorry. I meant to write >3 modifier permutations.
(i.eControl-Shift-Alt-Meta+Key-X is not covered. But
Control-Shift-Alt-Key-X is.)




-- 
Regards
Saimadhav Heblikar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.