Re: Recovering keys from key events



On Dec 23, 3:17 pm, Kevin Kenny <kenn...@xxxxxxx> wrote:

But remember that many key events come from composed sequences and
the like.

Thanks for this discussion. It's good to get confirmation from
someone who knows. Indeed, given the complexities involved (e.g.
sticky keys, etc.) it's kinda surprising that key handling works at
all :-)

Generally speaking, in an application, you have some fixed set
of key bindings that you want to handle: Ctrl-s might mean 'save',
for instance, or Alt-f might mean 'post the "File" menu'. You
bind the key events that correspond to these actions, and let the
other bindings flow through. If your application is a complicated
one with many text and entry widgets, you most likely will bind
the keys to a single bindtag, and then put that bindtag on multiple
widgets. What is it that you're doing that requires you to
distinguish the key state in a generic fashion? Are you trying
to subvert your platform's input methods, or something?

This is exactly how Leo works. No, I'm not trying to subvert the
platform's input method. Instead, Leo sends all keystrokes to a
'master key handler'. To do this, Leo binds all 'bound' keys to key-
specific callbacks that in turn call the master key handler with an
argument that tells what the original binding was. This requires
making a unique callback for every binding. It certainly works, but I
was hoping there was a way of having Tk do the work for me :-) Oh
well...

Edward
.



Relevant Pages

  • Re: cpuset and affinity implementation
    ... An example would be some sort of system with multiple CPUs where some ... So if you just make a set that includes all cpus in the system you can then bind your realtime threads to specific cpus and the other threads to the remainder. ... The reason individual threads can't be assigned to groups is because cpuset_getidfor a pid wouldn't make sense then and I expect administrators to be mostly interested in managing groups of processes. ... bindings when returning the processor set for the process. ...
    (freebsd-arch)
  • RE: Source Safe Visual Studio bindings incorrect after Share and B
    ... latest version from the new branch so it is easy for the incorrect bindings ... only for some solutions while others appear to bind to the new branch. ... The binding information is stored in .sln file. ... VSS doesn't know about it. ...
    (microsoft.public.vsnet.ide)
  • Re: Binding to menu entry - not just to menu(-tree)
    ... bindings "quite safely"? ... bind .menubar.help.menu ... tag. ... and use helptext() lookup instead of most ...
    (comp.lang.tcl)
  • Re: Tktable question
    ... was doing for bindings and asked why, ... bind Table ... virtual events, but the lack of double angle braces (in other words, ... place the data into the appropriate buffer? ...
    (comp.lang.tcl)
  • RE: ODBC : trying to bind the bookmark column
    ... "Leo" wrote: ... I have all the columns to update already bound, all I need is to bind the ... Can I use the SQLBindCol as I did with other columns? ... And which kind of buffer shoud I associate to the bookmark row? ...
    (microsoft.public.data.odbc)