@@ -7,7 +7,7 @@ class InputHandler:
77
88 class Modifiers :
99 def __init__ (
10- self , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
10+ self , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
1111 ):
1212 self .alt = alt
1313 self .shift = shift
@@ -61,9 +61,9 @@ def on(
6161 self ,
6262 event : str ,
6363 func : Callable ,
64- alt : bool | None = False ,
65- shift : bool | None = False ,
66- ctrl : bool | None = False ,
64+ alt : bool | None = None ,
65+ shift : bool | None = None ,
66+ ctrl : bool | None = None ,
6767 ):
6868 if event not in self ._callbacks :
6969 self ._callbacks [event ] = []
@@ -87,42 +87,42 @@ def emit(self, event: str, ev: dict, *args):
8787 func (ev , * args )
8888
8989 def on_dblclick (
90- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
90+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
9191 ):
9292 self .on ("dblclick" , func , alt , shift , ctrl )
9393
9494 def on_click (
95- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
95+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
9696 ):
9797 self .on ("click" , func , alt , shift , ctrl )
9898
9999 def on_mousedown (
100- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
100+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
101101 ):
102102 self .on ("mousedown" , func , alt , shift , ctrl )
103103
104104 def on_mouseup (
105- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
105+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
106106 ):
107107 self .on ("mouseup" , func , alt , shift , ctrl )
108108
109109 def on_mouseout (
110- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
110+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
111111 ):
112112 self .on ("mouseout" , func , alt , shift , ctrl )
113113
114114 def on_wheel (
115- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
115+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
116116 ):
117117 self .on ("wheel" , func , alt , shift , ctrl )
118118
119119 def on_mousemove (
120- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
120+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
121121 ):
122122 self .on ("mousemove" , func , alt , shift , ctrl )
123123
124124 def on_drag (
125- self , func , alt : bool | None = False , shift : bool | None = False , ctrl : bool | None = False
125+ self , func , alt : bool | None = None , shift : bool | None = None , ctrl : bool | None = None
126126 ):
127127 self .on ("drag" , func , alt , shift , ctrl )
128128
0 commit comments