<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="en">
	<title>Ethan Anderson</title>
	<subtitle>Ethan is an applications developer at a company called PebblePad.</subtitle>
	<link href="https://ethana.dev/feed/feed.xml" rel="self"/>
	<link href="https://ethana.dev/"/>
	<updated>2024-04-30T00:00:00Z</updated>
	<id>https://ethana.dev/</id>
	<author>
		<name>Ethan Anderson</name>
		<email></email>
	</author>
	
	<entry>
		<title>KeyboardEvent quirks with MacOS</title>
		<link href="https://ethana.dev/blog/macoswhy/"/>
		<updated>2024-04-30T00:00:00Z</updated>
		<id>https://ethana.dev/blog/macoswhy/</id>
		<content type="html">&lt;h2 id=&quot;what-happened-this-time&quot; tabindex=&quot;-1&quot;&gt;What happened this time? &lt;a class=&quot;header-anchor&quot; href=&quot;https://ethana.dev/blog/macoswhy/&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Recently I have been implementing a new system for managing keyboard shortcuts in our web application.&lt;/p&gt;
&lt;p&gt;When we were architecting the API for this we decided that for MacOS we would make use of the &lt;code&gt;command&lt;/code&gt; key for the access key.&lt;/p&gt;
&lt;p&gt;This seemed like a logical choice and was inline with what seemed to be a general convention across MacOS applications however whilst implementing this new system and testing things in different browsers/operating systems we uncovered some amazingly dumb behaviour that occurs in the land of MacOS when using the &lt;code&gt;command&lt;/code&gt; key and &lt;code&gt;keyup&lt;/code&gt; events.&lt;/p&gt;
&lt;p&gt;When the command key is pressed down along with another alphanumeric or symbol key e.g. &lt;code&gt;z&lt;/code&gt; it will trigger &lt;code&gt;keydown&lt;/code&gt; events for both keys as expected however on releasing the z key no keyup event will fire.&lt;/p&gt;
&lt;p&gt;This is because of some weird MacOs specific behaviour that seems to modify the keys when command is pressed down resulting in the &lt;code&gt;keyup&lt;/code&gt; event for that key not being fired as it should do, causing problems for anything that relies on &lt;code&gt;keyup&lt;/code&gt; events being fired.&lt;/p&gt;
&lt;p&gt;The exception to this rule seems to be keys that are treated as access keys e.g. &lt;code&gt;shift&lt;/code&gt;, &lt;code&gt;control&lt;/code&gt; and &lt;code&gt;alt&lt;/code&gt;. Holding down &lt;code&gt;command&lt;/code&gt; + any of those keys and then releasing them will cause the correct &lt;code&gt;keyup&lt;/code&gt; events for the key presses to trigger.&lt;/p&gt;
&lt;p&gt;Thanks Apple for the endless pain and issues. 🙄&lt;/p&gt;
&lt;p&gt;tl:dr MacOs sucks, Tim Apple is trolling and &lt;code&gt;keyup&lt;/code&gt; events for alphanumeric and symbol keys will not fire whilst &lt;code&gt;command&lt;/code&gt; is being pressed.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Home cooked links</title>
		<link href="https://ethana.dev/blog/homecookedlinks/"/>
		<updated>2024-01-26T00:00:00Z</updated>
		<id>https://ethana.dev/blog/homecookedlinks/</id>
		<content type="html">&lt;h2 id=&quot;what-is-this&quot; tabindex=&quot;-1&quot;&gt;What is this? &lt;a class=&quot;header-anchor&quot; href=&quot;https://ethana.dev/blog/homecookedlinks/&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a short note of a post so I can keep hold of some cool interesting links to do with something called &amp;quot;Home cooked apps&amp;quot;.&lt;/p&gt;
&lt;p&gt;The idea of &amp;quot;Home cooked apps&amp;quot; is that they are apps made just for you or a very small group of individuals like family or friends and not intended for mass market consumption.&lt;/p&gt;
&lt;p&gt;Because of their small scope they dont need to be perfect or scale to millions of users they just need to work for your individual needs.&lt;/p&gt;
&lt;p&gt;As someone who has always struggled with finishing side projects including this site partly due to a level of perfectionism and wanting everything to be perfect I find the idea of &amp;quot;Home cooked apps&amp;quot; somewhat enticing.&lt;/p&gt;
&lt;p&gt;These two blog posts the first by &lt;a href=&quot;https://www.robinsloan.com/&quot;&gt;Robin Sloan&lt;/a&gt; and the second by &lt;a href=&quot;https://blakewatson.com/&quot;&gt;Blake Watson&lt;/a&gt; go into more detail about the idea of &amp;quot;Home cooked apps&amp;quot;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.robinsloan.com/notes/home-cooked-app/&quot;&gt;Home cooked app&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blakewatson.com/journal/magnoliajs-2023-the-joys-of-home-cooked-apps/&quot;&gt;The joys of home-cooked apps&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	
	<entry>
		<title>This is my first post</title>
		<link href="https://ethana.dev/blog/firstpost/"/>
		<updated>2024-01-22T00:00:00Z</updated>
		<id>https://ethana.dev/blog/firstpost/</id>
		<content type="html">&lt;h2 id=&quot;in-the-beginning&quot; tabindex=&quot;-1&quot;&gt;In the beginning &lt;a class=&quot;header-anchor&quot; href=&quot;https://ethana.dev/blog/firstpost/&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I have had this site and domain for at least 5 years now and in that time its been redesigned at least six or severn times and rebuilt in every sort of javascript and frontend framework available to humankind.&lt;/p&gt;
&lt;p&gt;Despite this I have never really posted much, instead its been left to gather dust and serve as more of a project that I can tinker with and try out different frameworks and technologies that I was interested in at the time.&lt;/p&gt;
&lt;p&gt;A part of that is never getting into the routine of documenting my rants and thoughts into posts for unfortunate souls on the internet to see but another reason for that was just that often there was too much friction with doing it due too how my site had been built.&lt;/p&gt;
&lt;p&gt;Hopefully this newly redesigned and rebuilt version using the static site generator 11ty will provide me with the simple base I need to just ship posts when I feel like it without getting bogged down in x javascript framework of the month everyone is losing their minds over.&lt;/p&gt;
&lt;p&gt;Or I will post a handful of times and it will gather dust for another 5 years who knows. 😆&lt;/p&gt;
&lt;h3 id=&quot;side-note&quot; tabindex=&quot;-1&quot;&gt;Side note &lt;a class=&quot;header-anchor&quot; href=&quot;https://ethana.dev/blog/firstpost/&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One cool thing about this new site is that I finally have nice syntax highlighting for code blocks including diffs. 🥳&lt;/p&gt;
&lt;pre class=&quot;language-diff-ts&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-diff-ts&quot;&gt;&lt;span class=&quot;token unchanged language-ts&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;// This is a comment&lt;/span&gt;
&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token builtin&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-ts&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; value &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; b&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted language-ts&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;  value &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; b&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;token unchanged language-ts&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;/span&gt;
&lt;span class=&quot;token unchanged language-ts&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;// Test with a line break above this line.&lt;/span&gt;
&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Test&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
</feed>
