aboutsummaryrefslogtreecommitdiff
path: root/global_editmode_0-plugin.tcl
blob: 98f7a6a1e9ad734011e0adccb022dfe714ff950d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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