From: Kevin W. <kw...@co...> - 2011-07-12 12:25:06
|
On 7/11/11 9:02 PM, Hans-Christoph Steiner wrote: > > In Pd-extended, I'm getting a strange inconsistency with binding to > key combinations that is only triggered with key bindings that include > Shift in it. This happens only on Mac OS X 10.6 using the built-in > Tcl/Tk. Mac OS X 10.5 with custom built 8.5.8 works fine, as well as > Windows and GNU/Linux. The windows are each a toplevel that has a > canvas covering the full window, then everything else is drawn onto > the canvas. The bindings in question are: > > set ::modifier "Mod1" ;# for x-platform support > set ::altkey "Option" > bind all<$::modifier-Key-a> {menu_send %W selectall} > bind all<$::modifier-$::altkey-Key-a> {menu_toggle_autopatch} > bind all<$::modifier-Shift-Key-B> {menu_send %W bng} > > When I press Cmd-a, menu_send is called once with the canvas id. Same > goes for Cmd-Option-a. But when I press Cmd-Shift-b, menu_send is > called twice, once for the toplevel and again for the canvas. > > There are about 30 $::modifier-Key bindings, 4 $::modifier-$::altkey- > Key bindings, and 15 $::modifier-Shift-Key bindings, and this > behavior is consistent across all of them, it is only the bindings > with the Shift that get sent twice. > > You can see the full code in question here: > http://pure-data.git.sourceforge.net/git/gitweb.cgi?p=pure-data/pd-extended.git;a=blob;f=tcl/pd_bindings.tcl;h=554adbd9bd5ddd476e51caddfb0aa1e5536990c1;hb=HEAD > > Any ideas? > > .hc > I'll try to take a look at this soon. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com |