Web Excursions 2021-09-08

Compressing Your Keyboard - Matt Gemmell

  • This article is about switching to a smaller keyboard (with fewer keys), why you might want to, and how to reintroduce the functions of missing keys in a way that capitalises on your own muscle memory.

  • The first thing I’d advise is to let your mistakes, rather than your intentions, be the primary driver in customising your keyboard.

    • Mistakes in this context, when made persistently, indicate what your muscle memory expects to happen:

    • they show where the most glaring and annoying differences lie between

      • what you have now and

      • what you were used to before.

  • There’s no question that layers are useful, and are indeed the primary means by which smaller keyboards retain full functionality,

    • but they’re only one of the tools at your disposal.

  • Suitably configured, a single key can have at least four different functions without resorting to layers at all —

    • Not just tapping keys, but also of holding them down, quickly double-tapping, or tapping and then holding.

    • and that’s without considering the idea of chording, which is the simultaneous pressing of multiple keys to trigger particular functions.

  • What I learned was that my brain didn’t seem to care much about whether I had to tap or hold a key to trigger a given function or character;

    • what really mattered was where the physical key was.

    • This probably seems obvious in retrospect;

    • spatial memory is powerful and fundamental, whereas

    • the mechanics of an interaction are comparatively incidental

  • I seem to respond to three different things:

    • Position relative to alphabetic keys.

    • Position relative to the top edge of the keyboard.

    • Position relative to the bottom edg

  • strategy as follows:

    • Determine where your brain expects a key to be, in terms of which physical boundary or key it’s positioned relative to.

    • This is most easily seen when you try to type the key without looking, and thus make an error on an unfamiliar keyboard.

  • Put the key there on your smaller keyboard, using an alternate interaction trigger that feels most natural to you. For me, that’s the hold interaction.

  • my perception of where Tab lives is relative to the alphabetic cluster: I expect it to be to the left of Q.

    • By contrast, I don’t really seem to expect Escape to be anywhere at all

  • Errors, coupled with the fact that numeric entry can’t be automatically validated in the same way that spellchecking validates your typed letters, and the potential for numerical errors to have significant repercussions, has always made me feel that the number row is awkward, precarious, and stressful to use.

    • created a dedicated number pad layout on a different layer, reusing the positions of 7-9 and filling in the rest of the standard numpad below them.

  • Enter is a key that you tap, and Shift is a key that you hold while pressing other keys.

    • On my keyboard, it just so happens that they’re the same key.

  • If I hold O for 200 milliseconds, it’s hyphen instead.

    • Similarly, P becomes equals.

    • Those two keys also give me minus, plus, underscore, en-dash, and em-dash… as well as O and P themselves, in lowercase and uppercase.

  • my brain’s map for the brackets/braces key was just “they’re below hyphen and equals”

    • This immediately suggests the most logical place to put them: as hold functions on my L and semicolon keys, which are just beneath O and P

    • The most satisfying aspect of this approach for me is that it’s based entirely on feel, and where I subconsciously want things to be

  • I think that people who write, but who use a pointing device to move their cursor to edit their work are absolutely insane.

    • I think those people were put upon the Earth to psychically injure me every time I see their monstrous flailing.

    • I think they’re eating soup with a fork.

    • I think that to look into their eyes would be to gaze into the stygian vortex of madness.

    • I mean, if I saw such a person in the street, I’m not even sure I’d brake.

  • Holding the up-arrow for a fifth of a second will produce a question-mark directly.

  • Weirdly, it seems like in this context, my brain equates the “extra thing” it had to do to get the question-mark before (hold down a Shift key) with the “extra thing” of holding down the up-arrow key for a fraction of a second longer than usual.

  • it’s certainly alright to want things to work the way you want them to work, and that the mere fact of wanting is sufficient justification.

  • The beauty of small and customisable keyboards is that,

    • quite contrary to sacrificing the functionality you’re used to,

    • you can actually smooth over many of the rough edges of adaption by introducing consistency and thus comfort that’s unique to your own needs, expectations, and muscle memory.

    • That’s a delightful thing, and something you ought to avail yourself of.

Pinky Pressing Problem — /dev/lawyer

  • I’d almost completely stopped typing the letter p with my little finger.

  • Going back to the clear-switch board now, I find it noticeably more difficult to type p with my little finger.

    • It’s a weak finger in an awkward position against a stiff spring.

  • As a side note, an interesting study of typists’ movement strategies identified a common right-hand strategy the researched called “‘lapsed’ touch typist”,

    • where the little finger continues to press right-side Shift, the middle finger takes over p, and the middle finger sometimes types o and i, as well.

    • I found the top-level takeaway from that study—that typing with five fingers can be as fast as typing with ten—a bit disingenuous.

    • None of the typists studied reached speeds that I’d call “fast”.

    • In my lines of work, among programmers and writers, I don’t think 100 words per minute with very good accuracy unusual.

How We Type: Movement Strategies and Performance in Everyday Typing

5 things you didn't know about how you type

  1. With just 5 fingers you can be as fast as somebody using all 10.

  2. Don't worry if you never took a typing course. Those who did are not necessarily faster than you.

  3. You could type without looking at your fingers, even if you never learned the touch typing system.

  4. Your two hands move very differently when typing.

  5. There are many strategies between "hunt-and-peck" and touch typing. In fact, we all type very differently.


  • This paper revisits the present understanding of typing,

    • which originates mostly from studies of trained typists using the ten-finger touch typing system.

  • Our goal is to characterise the majority of present-day users who are untrained and employ diverse, self-taught techniques.

  • In a transcription task, we compare self-taught typists and those that took a touch typing course.

  • We report several differences in performance, gaze deployment and movement strategies.

  • The most surprising finding is that self-taught typists can achieve performance levels comparable with touch typists, even when using fewer fingers.

  • Motion capture data exposes 3 predictors of high performance:

    1. unambiguous mapping (a letter is consistently pressed by the same finger),

    2. active preparation of upcoming keystrokes, and

    3. minimal global hand motion.

Opinion Newsletter by Paul Krugman

  • The systematic refusal to get vaccinated, refusal to wear masks, etc., is very clearly tied to the unique way that common-sense public health measures have been caught up in the culture war.

  • According to a recent NBC poll,

    • 91 percent of Biden voters have been vaccinated but

    • only 50 percent of Trump voters

  • Given America’s historical track record of failing to help those in need, our initial response to the pandemic was almost miraculously good:

    • generous unemployment benefits,

    • checks sent to most households,

    • expansions of other benefits.

  • Why was this politically possible?

    • Partly because at first even many conservatives saw pandemic unemployment as an act of God,

      • not a personal failing on the part of the unemployed.

    • Partly, also, progressives had ideas about what to do,

      • while the Trump administration and its allies were clueless.

  • So there was an element of the “Yes, Prime Minister” effect:

    • We must do something. This is something.

    • Therefore, we must do it.

My £4 a month server can handle 4.2 million requests a day

  • This website is hosted on a very cheap (£4 a month) VPS.

  • This server has 1 CPU and 2GB of RAM.

  • The slowest part of this website can theoretically handle 4.2 million requests a day.

  • 2 websites are hosted on this server.

    • They are both hosted behind an Apache webserver, my personal website is using Django so has all the associated bits needed for that as well (wsgi, etc, etc)

My £4 a month server can handle 4.2M requests a day


What Andy giveth, Bill taketh away.


  • I was thinking about how [macOS] must have a routine that’s constantly taking mouse input, buffering history, and running some algorithm to determine when user input is a mouse “shake”.


  • That particular example seems like something that's probably a lot cheaper than you'd initially think.

  • The OS has to

    • constantly take mouse input anyway to move the pointer and dispatch events to userspace.

    • It also needs to record the current and new position of the mouse pointer to dispatch the events.

  • Detecting whether the mouse is being "shaken" can be done with a ring buffer of mouse velocities over the last second or two of ticks.

    • At 60 fps, that's about 120 ints = 480 bytes.

  • Since you don't need to be precise, you can take Manhattan distance (x + y) rather than Euclidean distance (sqrt(x^2 + y^2)),

    • which is a basically negligible computation.

  • Add up the running total of the ring buffer -

    • and you don't even need to visit each element,

    • just keep a running total in a variable,

      • add the new velocity,

      • subtract the velocity that's about to be overwritten -

    • and if this passes a threshold that's say 1-2 screen widths, the mouse is being "shaken" and the pointer should enlarge.

  • In total you're looking at < 500 bytes and a few dozen CPU cycles per tick for this feature.