[PD-dev] rebinding tab and shift-tab in dialog windows
Krzysztof Czaja
czaja at chopin.edu.pl
Sat Jun 7 16:03:39 CEST 2003
another variant of the same (the rtt was 30 min, btw...):
--- ../src/u_main.tk 2002-11-28 06:58:14.000000000 +0100
+++ pd.tk 2003-06-07 15:31:34.000000000 +0200
@@ -33,8 +33,11 @@
# for Text objects to get control-s and control-t to do what we want for
# "text" dialogs below. Also we have to get rid of tab's changing the focus.
+namespace eval pdtk {set tab_binding [bind all <Key-Tab>]}
+namespace eval pdtk {set shifttab_binding [bind all <<PrevWindow>>]}
+
bind all <Key-Tab> ""
-bind all <Shift-Key-Tab> ""
+bind all <<PrevWindow>> ""
bind Text <Control-t> {}
bind Text <Control-s> {}
# puts stderr [bind all]
@@ -234,6 +237,7 @@
proc menu_documentation {} {
global help_directory
+ global pd_nt
set filename [tk_getOpenFile -defaultextension .pd \
-filetypes { {{documentation} {.pd .txt .htm}} } \
@@ -831,7 +835,7 @@
bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A}
bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0}
bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4}
- bind $name.c <Map> {pdtk_canvas_map %W %s}
+ bind $name.c <Map> {pdtk_canvas_map %W 0}
# bind $name.c <Unmap> {puts stderr map}
focus $name.c
# puts stderr "all done"
@@ -2187,6 +2191,9 @@
label $id.space5 -text ""
pack $id.space5 -side top
+ bind $id <Key-Tab> $pdtk::tab_binding
+ bind $id <<PrevWindow>> $pdtk::shifttab_binding
+
bind $id.dim.w_ent <KeyPress-Return> [concat iemgui_ok $id]
bind $id.dim.h_ent <KeyPress-Return> [concat iemgui_ok $id]
More information about the Pd-dev
mailing list