Menu

Win + click to convert any file: building a WinUI 3 app that lives in Explorer
📰

Win + click to convert any file: building a WinUI 3 app that lives in Explorer

DEV Community: csharp·Morphalo·10 days ago
#xkunKLTC
#devtocsharp#devto#dev#click#explorer
Long article (691 words) — no AI summary yet.
Reading 0:00
15s threshold

I build Morphalo , a Windows 11 utility with one idea: you shouldn't have to open a converter. Hold the Windows key, click a file in File Explorer, and a ring of actions (the Halo) opens around it with every conversion and tool that fits that file. Pick one. The original stays untouched; the new file waits beside it.

This post is about the parts that were interesting to build: catching a modifier-click globally without breaking the shell, an Explorer context-menu entry that can't crash Explorer, and keeping heavy native libraries out of the UI process.

1. Catching Win + click without owning the shell

The gesture needs a global hook: WH_KEYBOARD_LL to track the modifier chord and WH_MOUSE_LL to see the click. Both run on a dedicated thread with its own message loop , because low-level hooks are called on the installing thread and Windows silently removes a hook that is slow to return.

The rule I ended up enforcing in code review: hook callbacks do no allocations, no COM and no logging.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.