Revision: 9776 http://pure-data.svn.sourceforge.net/pure-data/?rev=9776&view=rev Author: eighthave Date: 2008-05-09 12:42:33 -0700 (Fri, 09 May 2008)
Log Message: ----------- fixed up Tab, Space, Return, Escape for [key]/[keyup]/[keyname]
Modified Paths: -------------- branches/pd-extended/v0-40/pd/src/g_editor.c branches/pd-extended/v0-40/pd/src/u_main.tk
Modified: branches/pd-extended/v0-40/pd/src/g_editor.c =================================================================== --- branches/pd-extended/v0-40/pd/src/g_editor.c 2008-05-09 18:54:24 UTC (rev 9775) +++ branches/pd-extended/v0-40/pd/src/g_editor.c 2008-05-09 19:42:33 UTC (rev 9776) @@ -1474,13 +1474,16 @@ gotkeysym = av[1].a_w.w_symbol; else if (av[1].a_type == A_FLOAT) { - if ((int)(av[1].a_w.w_float) == 8) - gotkeysym = gensym("BackSpace"); - else if ((int)(av[1].a_w.w_float) == 127) - gotkeysym = gensym("Delete"); - else + char buf[3]; + switch((int)(av[1].a_w.w_float)) { - char buf[3]; + case 8: gotkeysym = gensym("BackSpace"); break; + case 9: gotkeysym = gensym("Tab"); break; + case 10: gotkeysym = gensym("Return"); break; + case 27: gotkeysym = gensym("Escape"); break; + case 32: gotkeysym = gensym("Space"); break; + case 127:gotkeysym = gensym("Delete"); break; + default: sprintf(buf, "%c", (int)(av[1].a_w.w_float)); gotkeysym = gensym(buf); }
Modified: branches/pd-extended/v0-40/pd/src/u_main.tk =================================================================== --- branches/pd-extended/v0-40/pd/src/u_main.tk 2008-05-09 18:54:24 UTC (rev 9775) +++ branches/pd-extended/v0-40/pd/src/u_main.tk 2008-05-09 19:42:33 UTC (rev 9776) @@ -1894,6 +1894,18 @@ if {$key == "BackSpace"} { set iso "" set key 8 + } elseif {$key == "Tab"} { + set iso "" + set key 9 + } elseif {$key == "Return"} { + set iso "" + set key 10 + } elseif {$key == "Escape"} { + set iso "" + set key 27 + } elseif {$key == "Space"} { + set iso "" + set key 32 } elseif {$key == "Delete" || $key == "KP_Delete"} { set iso "" set key 127
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.