From d40cb15eea00588c09e9deacc7af6bfa9cd07001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Korpim=C3=A4ki?= Date: Sun, 2 May 2021 19:37:12 +0200 Subject: [PATCH] Grab keyboard focus when clickable area hovered Finally figured out how to do this. This change makes it possible for the first time for the overlay window to react to keyboard events, and so it's possible to make any arbitrary interactive web UI with it! It's pretty neato. This is a proof of concept! There are many minor bugs, like drag-and-drop completely breaks when trying to drag out of the overlay's clickable area, and enter/leave events jitter when sweeping the mouse along edges of the screen. That kind of thing. Related to #3 and #5, but not global; no events are duplicated here. --- example/page.html | 6 +++++ main.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/example/page.html b/example/page.html index 6e1002f..0d5c543 100644 --- a/example/page.html +++ b/example/page.html @@ -26,6 +26,7 @@
+

Welcome to the future!

You should be able to—