handle Windows key on windows (Mod4Mask)
This commit is contained in:
parent
ba00ba2921
commit
6c4c8b3a50
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 <Mod4-KeyPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod4Mask}]}
|
||||
bind $topwin <Shift-Mod4-KeyPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$ShiftMask + $Mod4Mask}]}
|
||||
bind $topwin <Control-Mod4-KeyPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$ControlMask + $Mod4Mask}]}
|
||||
bind $topwin <Alt-Mod4-KeyPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod1Mask + $Mod4Mask}]}
|
||||
bind $topwin <Mod4-KeyPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod4Mask}]}
|
||||
bind $topwin <Alt-ButtonPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$Mod1Mask}]}
|
||||
bind $topwin <Control-Alt-ButtonPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$ControlMask + $Mod1Mask}]}
|
||||
bind $topwin <Shift-Alt-ButtonPress> {xschem callback %W %T %x %y 0 %b 0 [expr {$ShiftMask + $Mod1Mask}]}
|
||||
|
|
|
|||
Loading…
Reference in New Issue