On Sep 27, 2011, at 11:47 PM, Marvin Humphrey wrote:
On Tue, Sep 27, 2011 at 11:50:07AM -0400, Mathieu Bouchard wrote:Le 2011-09-25 à 09:29:00, Marvin Humphrey a écrit :The patch below fixes the problem. I don't know if it's the right solution,though.Pd doesn't _have_ to pass keynums around like that. If the Tk code were sending Up/Down/Left/Right names as given by Tk's bind's %K (uppercase), then you wouldn't have to replicate in g_editor.c things that Tk alreadydoes as part of its portability layer.Ha, interesting.The patch below, which also achieves correct behavior of cursor keys under Snow Leopard, is an alternative to the patch supplied earlier. This one has the advantage of removing the "#ifdef __APPLE__" code from src/ g_editor.c, as the normalization is now achieved via Tk. However, I don't yet understand all theramifications, just as I did not with the last patch. Marvin Humphrey
The question with this patch then, is does it work fine on GNU/Linux and Windows? I really think the whole key handling code in both Tcl and C needs rewriting rather than patching. Perhaps matju's answer is the way forward, making it based on the %K bind var rather the %k.
I added a couple more keys to your origin one:
arrow_keys.patch
Description: Binary data
.hc ----------------------------------------------------------------------------Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra
_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list