<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Morphalo</title>
    <description>The latest articles on DEV Community by Morphalo (@morphalo).</description>
    <link>https://dev.to/morphalo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4257172%2F5b96c3e3-c593-4f22-aa6a-e9a92e1b2cea.png</url>
      <title>DEV Community: Morphalo</title>
      <link>https://dev.to/morphalo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/morphalo"/>
    <language>en</language>
    <item>
      <title>Win + click to convert any file: building a WinUI 3 app that lives in Explorer</title>
      <dc:creator>Morphalo</dc:creator>
      <pubDate>Sat, 21 Nov 2026 10:50:40 +0000</pubDate>
      <link>https://dev.to/morphalo/win-click-to-convert-any-file-building-a-winui-3-app-that-lives-in-explorer-48h7</link>
      <guid>https://dev.to/morphalo/win-click-to-convert-any-file-building-a-winui-3-app-that-lives-in-explorer-48h7</guid>
      <description>&lt;p&gt;I build &lt;strong&gt;Morphalo&lt;/strong&gt;, a Windows 11 utility with one idea: you shouldn't have to &lt;em&gt;open&lt;/em&gt; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Catching Win + click without owning the shell
&lt;/h2&gt;

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

&lt;p&gt;The rule I ended up enforcing in code review: &lt;strong&gt;hook callbacks do no allocations, no COM and no logging.&lt;/strong&gt; They update a tiny chord state machine, and if the chord matches, they post a message to a separate probe thread and return immediately. When the chord click is ours, the mouse hook returns 1 to swallow it, so Explorer doesn't also select or open the file.&lt;/p&gt;

&lt;p&gt;The state machine (which keys are down, left vs. right modifiers, what counts as a chord) has no Win32 calls in it, so it's unit-tested on any OS.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Which file did they click?
&lt;/h2&gt;

&lt;p&gt;The hook gives you screen coordinates, not a file. The probe thread uses &lt;strong&gt;UI Automation&lt;/strong&gt; (&lt;code&gt;IUIAutomation&lt;/code&gt;) to resolve the element under the point and walk up to the Explorer item, then asks the shell for its path. It works for Explorer windows and the desktop, and it's the supported way to do this, rather than sampling pixels or guessing from window titles.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Copilot+ PCs already use Win + click
&lt;/h2&gt;

&lt;p&gt;On Copilot+ PCs, Windows uses Win + click for &lt;strong&gt;Click to Do&lt;/strong&gt;. Morphalo never writes Click to Do policy keys on its own. Instead, it asks on first start which click you'd like (Win + right-click, Win + Alt + click, or Ctrl + Alt + click), and the chord stays configurable.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A context-menu entry that can't crash Explorer
&lt;/h2&gt;

&lt;p&gt;"Convert with Morphalo" appears in the Windows 11 right-click menu through the MSIX manifest (&lt;code&gt;desktop4:FileExplorerContextMenus&lt;/code&gt;). The handler is a COM class hosted in a &lt;strong&gt;surrogate (&lt;code&gt;dllhost&lt;/code&gt;)&lt;/strong&gt;, not loaded into &lt;code&gt;explorer.exe&lt;/code&gt;. All it does is send the selected paths to the Morphalo host over a named pipe. If something goes wrong, Explorer doesn't go down with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Native engines live in a worker process
&lt;/h2&gt;

&lt;p&gt;Conversions run in a separate &lt;strong&gt;worker&lt;/strong&gt; process, talking to the host over StreamJsonRpc with MessagePack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ImageMagick (Magick.NET) for pictures, including HEIC, JPEG XL and camera RAW&lt;/li&gt;
&lt;li&gt;PDFium to render PDF pages, PDFsharp to create and edit PDFs&lt;/li&gt;
&lt;li&gt;An unmodified &lt;strong&gt;LGPL&lt;/strong&gt; FFmpeg build for audio and video (no GPL codecs; H.264/HEVC encode through hardware or Media Foundation)&lt;/li&gt;
&lt;li&gt;Open XML SDK for Excel, SharpCompress for archives&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LibreOffice, Pandoc and 7-Zip are &lt;strong&gt;optional&lt;/strong&gt;: downloaded once from their publishers, only after you agree, checked against a pinned SHA-256, installed per user without admin rights, and run as separate programs.&lt;/p&gt;

&lt;p&gt;Two rules made this safe to ship. External tools start only through &lt;code&gt;ProcessStartInfo.ArgumentList&lt;/code&gt;, never a shell string. And only one component writes next to user files, always as temp file plus atomic rename, never overwriting and never touching the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Packaging and the Store
&lt;/h2&gt;

&lt;p&gt;It ships as MSIX on the Microsoft Store (x64 for now), which handles updates and the trial: &lt;strong&gt;10 actions within 7 days, then buy once&lt;/strong&gt; (€4.99). No account, no uploads, no watermark. Here's the 60-second trailer: &lt;a href="https://youtu.be/SpEEDp_Ei20" rel="noopener noreferrer"&gt;https://youtu.be/SpEEDp_Ei20&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it / tell me what breaks
&lt;/h2&gt;

&lt;p&gt;It's early (v0.2), and I'd love feedback from people who live in Explorer. What file chore do you still open a website for?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Store: &lt;a href="https://apps.microsoft.com/detail/9NX9KK9TF6Q7" rel="noopener noreferrer"&gt;https://apps.microsoft.com/detail/9NX9KK9TF6Q7&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://www.morphalo.com" rel="noopener noreferrer"&gt;https://www.morphalo.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;I'm the developer of Morphalo. This post was drafted with help from an AI assistant and checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>windows</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
