Update of /cvsroot/pure-data/externals/tkwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24161
Modified Files: text.c Log Message: fixed issues with Ctrl-a and Ctrl-v bindings working as expected
Index: text.c =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/text.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** text.c 26 Nov 2007 20:54:16 -0000 1.17 --- text.c 26 Nov 2007 23:38:41 -0000 1.18 *************** *** 24,28 **** #include "shared/tkwidgets.h"
- /* TODO: get Ctrl-A working to select all */ /* TODO: set message doesnt work with a loadbang */ /* TODO: window name "handle1376fc00" already exists in parent */ --- 24,27 ---- *************** *** 177,180 **** --- 176,191 ---- sys_vgui("bind %s <KeyRelease> {+pd %s keyup %%N \;} \n", x->widget_id->s_name, x->receive_name->s_name); + /* override the standard Pd bindings for these since they cause trouble */ + #ifdef __APPLE__ + sys_vgui("bind %s <Mod1-a> {%s tag add sel 1.0 end} \n", + x->widget_id->s_name, x->widget_id->s_name); + sys_vgui("bind %s <Mod1-v> {tk_textPaste %s} \n", + x->widget_id->s_name, x->widget_id->s_name); + #else + sys_vgui("bind %s <Control-a> {%s tag add sel 1.0 end} \n", + x->widget_id->s_name, x->widget_id->s_name); + sys_vgui("bind %s <Control-v> {tk_textPaste %s} \n", + x->widget_id->s_name, x->widget_id->s_name); + #endif }