소스 검색

fix modifier keys for interactive image (fixes #2530)

Falko Schindler 1 년 전
부모
커밋
39ca3176f5
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      nicegui/elements/interactive_image.py

+ 4 - 4
nicegui/elements/interactive_image.py

@@ -71,10 +71,10 @@ class InteractiveImage(SourceElement, ContentElement, component='interactive_ima
                 image_y=args.get('image_y', 0.0),
                 button=args.get('button', 0),
                 buttons=args.get('buttons', 0),
-                alt=args.get('alt', False),
-                ctrl=args.get('ctrl', False),
-                meta=args.get('meta', False),
-                shift=args.get('shift', False),
+                alt=args.get('altKey', False),
+                ctrl=args.get('ctrlKey', False),
+                meta=args.get('metaKey', False),
+                shift=args.get('shiftKey', False),
             )
             handle_event(on_mouse, arguments)
         self.on('mouse', handle_mouse)