diff --git a/src/xinit.c b/src/xinit.c index 54bcf83f..6193d260 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2640,6 +2640,8 @@ int Tcl_AppInit(Tcl_Interp *inter) /* pass to tcl values of Alt, Shift, COntrol key masks so bind Alt-KeyPress events will work for windows */ #ifndef __unix__ + my_snprintf(tmp, S(tmp), "%d", Mod4Mask); + tclsetvar("Mod4Mask", tmp); my_snprintf(tmp, S(tmp), "%d", Mod1Mask); tclsetvar("Mod1Mask", tmp); my_snprintf(tmp, S(tmp), "%d", ShiftMask); diff --git a/src/xschem.tcl b/src/xschem.tcl index c1cf947f..cd9efc0c 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -5784,6 +5784,11 @@ global env has_x OS autofocus_mainwindow # on Windows Alt key mask is reported as 131072 (1<<17) so build masks manually with values passed from C code if {$OS == "Windows" } { + bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod4Mask}]} + bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$ShiftMask + $Mod4Mask}]} + bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$ControlMask + $Mod4Mask}]} + bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod1Mask + $Mod4Mask}]} + bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod4Mask}]} bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod1Mask}]} bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$ControlMask + $Mod1Mask}]} bind $topwin {xschem callback %W %T %x %y 0 %b 0 [expr {$ShiftMask + $Mod1Mask}]}