aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kiosk-plugin.tcl23
1 files changed, 17 insertions, 6 deletions
diff --git a/kiosk-plugin.tcl b/kiosk-plugin.tcl
index 9edb72b..0f72cc3 100644
--- a/kiosk-plugin.tcl
+++ b/kiosk-plugin.tcl
@@ -26,6 +26,7 @@ set ::kiosk::config(ScrollBars) False
set ::kiosk::config(QuitOnClose) True
set ::kiosk::config(PreventClose) True
set ::kiosk::config(Bindings) False
+set ::kiosk::config(QuitBinding) True
@@ -62,10 +63,8 @@ menu .kioskmenu
proc ::kiosk::makekiosk {mywin} {
## refuse to kioskify the main Pd window
if { $mywin == ".pdwindow" } { return; }
+# puts "KIOSKing $mywin"
- puts "KIOSKing $mywin"
-
-#puts "makekiosk $mywin"
#remove menu
if { $::kiosk::config(ShowMenu) } { } {
$mywin configure -menu .kioskmenu;
@@ -94,10 +93,22 @@ proc ::kiosk::makekiosk {mywin} {
}
}
+ set mycnv [tkcanvas_name $mywin ]
+
+# remove all special key/mouse bindings from the window
+ if { $::kiosk::config(QuitBinding) } { } {
+ bind $mycnv <Control-Key-w> {}
+ bind $mycnv <Control-Shift-Key-W> {}
+ bind all <Control-Key-w> {}
+ bind all <Control-Shift-Key-W> {}
+
+ bind $mycnv <Control-Key-q> {}
+ bind $mycnv <Control-Shift-Key-Q> {}
+ bind all <Control-Key-q> {}
+ bind all <Control-Shift-Key-Q> {}
+ }
# remove all special key/mouse bindings from the window
if { $::kiosk::config(Bindings) } { } {
-puts "prevent bindings"
- set mycnv [tkcanvas_name $mywin ]
bindtags $mywin ""
bindtags $mycnv "$mycnv"
# rebind ordinary keypress events
@@ -144,5 +155,5 @@ if { $::kiosk::config(KioskNewWindow) } {
}
-pdtk_post "loaded: kiosk-plugin 0.1\n"
+pdtk_post "loaded: kiosk-plugin 0.2\n"