<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tweaks on Notes</title><link>https://notes.casimir.me/t/tweaks/</link><description>Recent content in Tweaks on Notes</description><generator>Hugo</generator><language>en_GB</language><lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://notes.casimir.me/t/tweaks/index.xml" rel="self" type="application/rss+xml"/><item><title>The Dutch swap</title><link>https://notes.casimir.me/p/2026/the-dutch-swap/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><guid>https://notes.casimir.me/p/2026/the-dutch-swap/</guid><description>&lt;p&gt;I lived most of my life in AZERTY countries, but I got used to QWERTY once I started tinkering with Linux, since most Unix software is QWERTY-centric. If you are looking for an adventure, try using vim with a French keyboard.&lt;br&gt;
I can&amp;rsquo;t remember the details, but I somehow got my hands on an old laptop with a US layout. I spent a few years constantly switching between the two, AZERTY on my desktop and QWERTY on my laptop. It&amp;rsquo;s impressive how the brain can adapt sometimes.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I lived most of my life in AZERTY countries, but I got used to QWERTY once I started tinkering with Linux, since most Unix software is QWERTY-centric. If you are looking for an adventure, try using vim with a French keyboard.<br>
I can&rsquo;t remember the details, but I somehow got my hands on an old laptop with a US layout. I spent a few years constantly switching between the two, AZERTY on my desktop and QWERTY on my laptop. It&rsquo;s impressive how the brain can adapt sometimes.</p>
<p>Fast forward a few years and I discovered that layout variants are common in real life. Apple even provides a <a href="https://support.apple.com/en-us/102743" target="_blank">dedicated documentation page</a> to find out what your layout is. When starting a new job, I usually ask for a US keyboard, a QWERTY ANSI layout. In my last two jobs, I was provided laptops with a QWERTY layout. Yes but&hellip; ISO. Based on the Apple page, they were <em>Dutch</em> and <em>International English</em> keyboards.<br>
When starting a new position, you have a lot more in mind than changing your brand new laptop. So, both times, I kept them and took it upon myself to make it work.</p>
<p>It wasn’t a big deal but for one thing, I write a lot of French, and I need my composable accents. The backtick key is used for the <em>grave accent</em>, which is used a lot, and that key isn&rsquo;t in the usual place. Unbearable! I even tried not to use accents, but the grammarian in me couldn&rsquo;t let it pass. It&rsquo;s impressive how the brain can <em>not</em> adapt sometimes.</p>
<p><img loading="lazy" src="/p/2026/the-dutch-swap/indi-swap.jpg"></p>
<p>Fortunately, macOS uses <a href="https://www.usb.org/hid" target="_blank">USB HID specification</a> and even provides a <a href="https://developer.apple.com/library/archive/technotes/tn2450/_index.html" target="_blank">command to remap keys</a>. In the end, I swapped the paragraph key with the backtick key using the following one-liner:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>hidutil property --set <span style="color:#e6db74">&#39;{&#34;UserKeyMapping&#34;:[{&#34;HIDKeyboardModifierMappingSrc&#34;:0x700000035,&#34;HIDKeyboardModifierMappingDst&#34;:0x700000064},{&#34;HIDKeyboardModifierMappingSrc&#34;:0x700000064,&#34;HIDKeyboardModifierMappingDst&#34;:0x700000035}]}&#39;</span>
</span></span></code></pre></div><p>And for completeness, here is an annotated version of the property value:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;UserKeyMapping&#34;</span>: [
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#75715e">// 0x35 = Keyboard Grave Accent and Tilde
</span></span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;HIDKeyboardModifierMappingSrc&#34;</span>: <span style="color:#ae81ff">0</span><span style="color:#960050;background-color:#1e0010">x</span><span style="color:#ae81ff">700000035</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;HIDKeyboardModifierMappingDst&#34;</span>: <span style="color:#ae81ff">0</span><span style="color:#960050;background-color:#1e0010">x</span><span style="color:#ae81ff">700000064</span>
</span></span><span style="display:flex;"><span>    },
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#75715e">// 0x64 = Keyboard Non-US \ and |
</span></span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;HIDKeyboardModifierMappingSrc&#34;</span>: <span style="color:#ae81ff">0</span><span style="color:#960050;background-color:#1e0010">x</span><span style="color:#ae81ff">700000064</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;HIDKeyboardModifierMappingDst&#34;</span>: <span style="color:#ae81ff">0</span><span style="color:#960050;background-color:#1e0010">x</span><span style="color:#ae81ff">700000035</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  ]
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>The change doesn&rsquo;t survive a reboot, but just for the record, this is the way to roll it back:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>hidutil property --set <span style="color:#e6db74">&#39;{&#34;UserKeyMapping&#34;:[]}&#39;</span>
</span></span></code></pre></div><p>I am not interested in making it persistent myself but it&rsquo;s not that hard, that&rsquo;s just a plist file to create. I even found an <a href="https://aiex7.github.io/macOS-keyboard-configurator-hidutil/" target="_blank">online generator</a> for that when writing this note.</p>
<p>This is the low-level way of doing it, but for more involved setups there is the awesome <a href="https://karabiner-elements.pqrs.org/" target="_blank">Karabiner-Elements</a>. And it also handles external keyboards perfectly.</p>
]]></content:encoded></item></channel></rss>