[PD] Keyboard shortcuts for "nudge", "done editing"

Hans-Christoph Steiner hans at at.or.at
Wed Sep 28 06:43:06 CEST 2011

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  
>> already
>> does 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 the
> ramifications, 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_keys.patch
Type: application/octet-stream
Size: 1486 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110928/b5ddd12b/attachment.obj>
-------------- next part --------------



Computer science is no more related to the computer than astronomy is  
related to the telescope.      -Edsger Dykstra

More information about the Pd-list mailing list