A Brief History of AltRight

Recently, there has been a lot of discussion of AltRight. This sudden spike in attention confuses me a bit because it is not the sort of thing that people are typically interested in talking about. It is, however, both exciting and humbling to see so many take an interest in one’s handiwork.

You see, I was the person who created AltRight.

I did not set out to do anything special here. All I was trying to do was to make sure that related items would be grouped together. All I wanted was sense, order and consistency. All I wanted was for everything to be sorted properly alphabetically.

But I’m getting ahead of myself. Let me start with some background.

I started getting involved in web standards with the W3C back in 2013. A little-loved and awkwardly-named DOM Level 3 Events specification needed help — it was attempting to replace the unspecified (and inconsistently implemented) keyChar and keyCode attributes, but the specification as it stood at that time was… inadequate.

It was inadequate because while it claimed to be a replacement for the old attributes, it was not a superset of their functionality. And without that, it could never truly serve as a replacement. The old attributes would live on and the new ones would simply add to the confusion.

I resolved to fix this.

I became an editor for the specification and introduced the code attribute. And in this attribute I set out to assign a unique identifier for each physical key on all the different keyboards of the world.

Initially, I proposed using numeric codes like those used in Page 0x07 of the USB HID specification, but the W3C would have none of it. “This is the web,” they said. “No magic numbers. Everything must be a string.”

So I assigned names to the keys: KeyA, Backspace, IntlBackslash and so on. I was forced to rely on US-centric names for some keys since they were the most generic. But the modifier keys, they presented a special problem. Like animals on the ark, they arrived in pairs and I needed to distinguish them from each other.

Some older documents called for names like LeftShift and RightShift, but that naming scheme would group the keys in an alpha-sorted list by location rather than by function. So I applied a more rational approach: the location would come at the end of the name, ShiftLeft/ShiftRight, ControlLeft/ControlRight (and BracketLeft/BracketRight even though that’s not a modifier).

And thus was born AltRight.

I should pause to note that AltRight is a rather odd beast. On most keyboards, it serves the exact same purpose as the other Alt key, but for some (non-US) keyboards it provides a slightly angrier “AltGr” version of key. This alternate use means that AltRight is often present (even if you’d rather not have it around) even on small keyboards that omit the right Meta (OS) and Control keys.

The full list of key code values is in the (renamed) UIEvents KeyboardEvent code Value specification. Please let me know if there are other keys of interest and I can write about them as well.

As a final comment, note that I also created AltLeft. But for whatever reason that doesn’t seem to be getting as much attention at the moment.

The angry variant of AltRight in its native habitat.

Update: Holy shit! There’s an “organization” (well, not really) identifying itself with the terms “alt” and “right”. And they’re some sort of xenophobic, white nationalistic batshit-crazy wackos (sorry #NotAllBatshit #NotAllWackos). Ugh. Hopefully none of the other keys in the spec will be taken over by extremists.