Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caps lock acts as dead key on macOS/Qt 6.8.1 #3740

Open
dae opened this issue Jan 18, 2025 · 1 comment
Open

Caps lock acts as dead key on macOS/Qt 6.8.1 #3740

dae opened this issue Jan 18, 2025 · 1 comment

Comments

@dae
Copy link
Member

dae commented Jan 18, 2025

This is not reproducible in a simple hello-world PyQt app, so it seems to be something specific about our editing environment or app that is triggering this. More experimentation is required.

Working hello-world:

diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py
index eca04b261..cb5aa863b 100644
--- a/qt/aqt/__init__.py
+++ b/qt/aqt/__init__.py
@@ -567,7 +567,39 @@ def write_profile_results() -> None:
     profiler.dump_stats(profile)
 
 
+
+class MainWindow(QMainWindow):
+    def __init__(self):
+        super().__init__()
+        self.setWindowTitle("Hello, World! - PyQtWebEngine")
+        self.resize(800, 600)
+
+        # Create a QWebEngineView widget
+        self.browser = QWebEngineView()
+
+        # Set the HTML content for the browser
+        html_content = """
+        <!DOCTYPE html>
+        <html>
+        <head>
+            <title>Hello, World!</title>
+        </head>
+        <body>
+            <h1 style="text-align: center; margin-top: 20%;">Hello, World!</h1>
+            <div style="border: 1px solid black;" contenteditable=true>type here</div>
+        </body>
+        </html>
+        """
+        self.browser.setHtml(html_content)
+
+        # Set the browser as the central widget
+        self.setCentralWidget(self.browser)
+
 def run() -> None:
+    app = QApplication(sys.argv)
+    window = MainWindow()
+    window.show()
+    sys.exit(app.exec())
     print("Preparing to run...")
     try:
         _run()
@dae
Copy link
Member Author

dae commented Jan 18, 2025

Injecting <div style="border: 1px solid black;" contenteditable=true>type here</div> into the deckbrowser HTML also triggers the issue, so it doesn't seem to be connected to our sveltekit/editor environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant