From e58f6b3236f51c06e53c407a46d41f5e898c3b3c Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 30 Nov 2010 21:18:47 +0000 Subject: added the simple plugins from the pd-gui-rewrite/0.43/startup branch svn path=/trunk/scripts/guiplugins/simple_examples/; revision=14540 --- global_editmode_0-plugin.tcl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 global_editmode_0-plugin.tcl (limited to 'global_editmode_0-plugin.tcl') diff --git a/global_editmode_0-plugin.tcl b/global_editmode_0-plugin.tcl new file mode 100644 index 0000000..98f7a6a --- /dev/null +++ b/global_editmode_0-plugin.tcl @@ -0,0 +1,15 @@ +# +# this plugin maps Ctrl-Shift-E (Cmd-Shift-E) to switch all open patches to +# Interact Mode (i.e. the opposite of Edit Mode) + +proc global_turn_off_editmode {} { + pdtk_post "$::pd_menus::accelerator-Shift-E: Turning off edit mode for all open windows" + foreach window [winfo children .] { + if {[winfo class $window] eq "PatchWindow"} { + pdsend "$window editmode 0" + } + } +} + +# the "E" needs to be upper case, otherwise it gets missed with the 'Shift' +bind all <$::modifier-Shift-Key-E> global_turn_off_editmode -- cgit v1.2.1