Skip to content

Stop the kiosk window from stealing key focus - #57

Merged
fdussert merged 1 commit into
fdussert:mainfrom
LivioGama:touch/no-key-steal-clean
Nov 18, 2026
Merged

fdussert merged 1 commit into
fdussert:mainfrom
LivioGama:touch/no-key-steal-clean

Conversation

@LivioGama

Copy link
Copy Markdown
Contributor

Problem

Tapping the Edge dashboard made its window key, so the app being typed into on the main display lost keyboard focus. A dashboard shortcut sending ⌘V pasted into the dashboard instead of the user's field.

Change

KioskNSWindow is now a borderless .nonactivatingPanel NSPanel with canBecomeKey/canBecomeMain = false. Clicks still reach the page through FirstMouseWebView.acceptsFirstMouse. CHANGELOG line added.

Verification

  • swift build (native): passes.
  • Earlier manual test with simulated taps: TextEdit stayed frontmost and ⌘V pasted into it.
  • Real-touch confirmation on an ILITEK panel: pending.

🤖 Generated with Claude Code

The Edge dashboard window could become key, so every tap moved the keyboard
focus off the app being typed into on the main display, and a shortcut such as
Cmd-V landed in the dashboard. FirstMouseWebView already delivers the first
click through acceptsFirstMouse, so the window needs no key status. It is now a
non-activating NSPanel that refuses key and main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@fdussert fdussert left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Livio, this one fixes a real annoyance. I tested it on a real Xeneon Edge with real touches: typing in TextEdit on the main display while tapping the dashboard keeps the keyboard in TextEdit, ⌘Tab now opens on the main display instead of the Edge, taps, drags and swipes still reach the page, and the long press still opens the admin, which takes the keyboard right away. scripts/test-helper.sh passes.

One side effect worth knowing: the dashboard can no longer hear the ← → keys that turned pages, since it never becomes key. That's the point of the change and no widget has a text field, so I'm fine with it.

I'll merge it locally with the rest of main (only a CHANGELOG conflict); it lands with the next push.

@fdussert
fdussert merged commit 12257be into fdussert:main Nov 18, 2026
@fdussert

Copy link
Copy Markdown
Owner

Thanks for this fix, @LivioGama. It shipped in Fremkit 0.5.1, released today, with you as the author of the commit and its line in the release notes: https://github.com/fdussert/fremkit/releases/tag/v0.5.1

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

Successfully merging this pull request may close these issues.

2 participants