# Fast typing overlap

**URL:** <https://community.keyboard.io/t/fast-typing-overlap/788>\
**Category:** Typing & Ergonomics\
**Created:** [November 24, 2017, 4:54am UTC](https://community.keyboard.io/t/fast-typing-overlap/788 "2017-11-24T04:54:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 24, 2017, 4:54am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/1 "2017-11-24T04:54:52Z")

</div>

I’m starting to design a Kaleidoscope plugin, and I’m concerned about how well it might work for very fast typists (which I am not — I probably manage no more than 40 words per minute). My primary curiosity is about keypress overlap (when one key is pressed before the previous one is released), and in particular how often (if ever) a very fast typist might have more than two keys pressed simultaneously (but momentarily) in the course of normal typing — not counting modifier keys being held.

I’m also curious about the length of time that keyswitches are typically closed (on) during a normal “tap” (as opposed to being held) — again, during the normal course of typing, not other types of input activities, like game-playing.

Does anyone know where I can find data on this topic? Even better — is anyone here interested in helping to gather that data? (I believe this could be done in a number of ways, but the best might be yet another Kaleidoscope plugin, using the serial interface)

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 24, 2017, 6:40am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/2 "2017-11-24T06:40:48Z")

</div>

> [@merlin](#):
>
> Does anyone know where I can find data on this topic? Even better — is anyone here interested in helping to gather that data? (I believe this could be done in a number of ways, but the best might be yet another Kaleidoscope plugin, using the serial interface)

[Kaleidoscope-KeyLogger](https://github.com/keyboardio/Kaleidoscope-KeyLogger) could be used for this. It does not timestamp stuff, but you can timestamp on the host when reading, and that shouldn’t make much difference. It logs both key presses and releases, along with coordinates, and from that, you can build some stats about how many keys are pressed at the same time, how often, and what’s the average length of a tap.

This is going to vary a lot from person to person, because tap length depends on not only typing speed, but force too. There are heavy typists (myself included) who bottom out all the time, thus making the tap longer. There are light typists who don’t, and they only press the keys lightly, until they actuate. Their speed may very well be the same.

I do not have much data yet, but from what I can see from my own usage, my taps are in the ~50-100ms range, and when typing fast, I sometimes have more than three keys active. That happens rarely though, it is usually just two or so. But again, this is just about an hour worth of data.

---

<div class="post-metadata">

**Author:** ![noseglasses](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/noseglasses/32/429_2.png) [@noseglasses](https://community.keyboard.io/u/noseglasses)\
**Post date:** [November 24, 2017, 10:26am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/3 "2017-11-24T10:26:19Z")

</div>

> [@algernon](#):
>
> I sometimes have more than three keys active.

I experienced the same. That’s why the idea to put modifiers as dual use keys on the home row doesn’t work out. No matter how hard I trained to improve my accuracy, I always ended up with several keys being active at the same time, causing strange undesired short cuts being emitted.

As we are talking about timing. @algernon: Have you ever measured the time it takes to process keystrokes when using different plugins or combinations of them. Are there combinations that limit typing speed due to excessive processing or is the atmega always fast enough?

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 24, 2017, 11:13am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/4 "2017-11-24T11:13:22Z")

</div>

A post was split to a new topic: [Plugin latency measurements](https://community.keyboard.io/t/plugin-latency-measurements/793)

---

<div class="post-metadata">

**Author:** ![noseglasses](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/noseglasses/32/429_2.png) [@noseglasses](https://community.keyboard.io/u/noseglasses)\
**Post date:** [November 24, 2017, 11:41am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/5 "2017-11-24T11:41:30Z")

</div>

Thanks for splitting. I kinda hijacked merlin’s topic with my question.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 24, 2017, 5:18pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/6 "2017-11-24T17:18:40Z")

</div>

> [@algernon](#):
>
> I do not have much data yet, but from what I can see from my own usage, my taps are in the ~50-100ms range, and when typing fast, I sometimes have more than three keys active. That happens rarely though, it is usually just two or so. But again, this is just about an hour worth of data.

> [@noseglasses](#):
>
> I experienced the same. That’s why the idea to put modifiers as dual use keys on the home row doesn’t work out. No matter how hard I trained to improve my accuracy, I always ended up with several keys being active at the same time, causing strange undesired short cuts being emitted.

I’m a bit surprised at the “more than three keys active” simultaneously; I had been making an invalid assumption. The problem is a little bit harder than I thought, but I’m pretty sure I still have an algorithm in my head that will just about eliminate the overlap problem with dual-purpose keys that both `DualUse` and `SpaceCadet` have, and I think will make it possible to use home row keys as modifiers as well (@noseglasses seems to have correctly guessed what I was planning =).

The exact plugin that I have in mind will be more similar to `SpaceCadet` than `DualUse`, but it’s sufficiently different from both that I want to try writing it from scratch. I’m pretty sure I’ll need help to do it right, but I’m going to write up a description of the algorithm and data structures first in a new GitHub repo, then everyone who’s interested can take a look and point out how wrong I was. =P

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 24, 2017, 8:10pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/7 "2017-11-24T20:10:29Z")

</div>

Follow-up question:

When you’re typing, and you have multiple keys active at a time, do the key _releases_ reliably occur in the same order as the the key _presses_?

If so, I’m pretty sure I’ve got an algorithm that will work well. If the order of releases isn’t reliable, I’ve got an alternative algorithm in mind that would work, but would have a very small trade-off, and wouldn’t require any different data structures, so it could be easily user-configurable in the sketch.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 24, 2017, 8:32pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/8 "2017-11-24T20:32:12Z")

</div>

> [@merlin](#):
>
> When you’re typing, and you have multiple keys active at a time, do the key releases reliably occur in the same order as the the key presses?

From what I see in my logs, yes, releases will occur in the same order as the presses.

On the other hand, there _may_ be cases where this isn’t true. For example, if I bottom out a key, start releasing it, another finger barely actuates another at nearly the same time, the second might release sooner. Mind you, from what I can gather, this should be sufficiently rare. I tried to consciously make it happen, and failed. But theoretically, it is possible.

---

<div class="post-metadata">

**Author:** ![noseglasses](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/noseglasses/32/429_2.png) [@noseglasses](https://community.keyboard.io/u/noseglasses)\
**Post date:** [November 25, 2017, 11:07am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/9 "2017-11-25T11:07:26Z")

</div>

Interesting. I am looking forward to seeing your ideas.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 30, 2017, 5:22pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/10 "2017-11-30T17:22:29Z")

</div>

I got it working a bit quicker than expected: I’m calling it [Kaleidoscope-Qukeys](https://github.com/gedankenlab/Kaleidoscope-Qukeys), as an homage to “[qubits](https://en.wikipedia.org/wiki/Qubit)” from quantum computing. The description in the readme was written before the code, so I’m sure it needs updating. Also, it depends on a change not yet incorporated in Kaleidoscope: [#255](https://github.com/keyboardio/Kaleidoscope/pull/255), and one just merged in KeyboardioHID.

---

<div class="post-metadata">

**Author:** ![noseglasses](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/noseglasses/32/429_2.png) [@noseglasses](https://community.keyboard.io/u/noseglasses)\
**Post date:** [November 30, 2017, 11:06pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/11 "2017-11-30T23:06:26Z")

</div>

Just read the README. Very interesting approach. What’s your experience? Does it work as expected?

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 30, 2017, 11:49pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/12 "2017-11-30T23:49:42Z")

</div>

So far, yes. But I’m not a fast typist, and that’s putting it mildly. I have tried most of the test-cases I can think of, and it works like I hoped it would. I don’t think I’ve tried overflowing the queue yet… =)

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 30, 2017, 11:55pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/13 "2017-11-30T23:55:13Z")

</div>

Once it’s a little easier to build, I should ask for a volunteer who can type at least 100 wpm on a Model01 to try it out with a few keys configured to be `shift` as an alternate on commonly-used letter keys and see if it works well.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [November 30, 2017, 11:58pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/14 "2017-11-30T23:58:26Z")

</div>

…and before I do that I should try out using `Kaleidoscope-Macros` to toggle `Qukeys` on and off, and make sure that works.

---

<div class="post-metadata">

**Author:** ![james.nvc](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/james.nvc/32/54_2.png) [@james.nvc](https://community.keyboard.io/u/james.nvc)\
**Post date:** [December 1, 2017, 3:25am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/15 "2017-12-01T03:25:59Z")

</div>

I’d be happy to give it a go! “Once it’s a little easier to build” = when the next bit of KeyboardHID changes are merged in?

---

<div class="post-metadata">

**Author:** ![james.nvc](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/james.nvc/32/54_2.png) [@james.nvc](https://community.keyboard.io/u/james.nvc)\
**Post date:** [December 1, 2017, 3:53am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/16 "2017-12-01T03:53:53Z")

</div>

Gave it a quick test and I wasn’t able to see any aberrant behaviour (I usually type around 90WPM, my best on the Model 01 is 104). Seems pretty cool!

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [December 1, 2017, 5:18am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/17 "2017-12-01T05:18:01Z")

</div>

> [@james.nvc](#):
>
> I’d be happy to give it a go! “Once it’s a little easier to build” = when the next bit of KeyboardHID changes are merged in?

It was actually [Kaleidoscope #255](https://github.com/keyboardio/Kaleidoscope/pull/255) that hadn’t been merged yet. But it is now, and there’s a new version of Arduino-Boards that has all the necessary changes, so we are definitely at “easier to build” already.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [December 1, 2017, 5:26am UTC](https://community.keyboard.io/t/fast-typing-overlap/788/18 "2017-12-01T05:26:47Z")

</div>

> [@james.nvc](#):
>
> Gave it a quick test and I wasn’t able to see any aberrant behaviour (I usually type around 90WPM, my best on the Model 01 is 104). Seems pretty cool!

That’s very gratifying to hear; thanks for testing it out! Can you tell me which keys you configured? (I completely failed to describe how to give proper coordinates in any of the documentation…)

I should note that I haven’t made it easy to configure the timeout yet; it’s currently set at 500ms, but I was hoping to play with it and make it as short as possible while keeping the typing error rate close to zero. (It’s a balancing act between typing errors and using modifiers with external pointing devices, though it occurs to me that one _could_ tap a key that does nothing (`Key_NoKey`) to force it to the alternate state. That’s probably not worthwhile in practice, though.)

---

<div class="post-metadata">

**Author:** ![james.nvc](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/james.nvc/32/54_2.png) [@james.nvc](https://community.keyboard.io/u/james.nvc)\
**Post date:** [December 1, 2017, 2:47pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/19 "2017-12-01T14:47:43Z")

</div>

I just put shift on the “e” key (using Dvorak, so the key labeled ‘D’) and tried to type.

I was able to figure out how to configure it by copying the example in the project directory 😛

---

<div class="post-metadata">

**Author:** ![pdcawley](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/pdcawley/32/697_2.png) [@pdcawley](https://community.keyboard.io/u/pdcawley)\
**Post date:** [December 1, 2017, 7:52pm UTC](https://community.keyboard.io/t/fast-typing-overlap/788/20 "2017-12-01T19:52:13Z")

</div>

When I was using Karabiner to get dual use “SHFT/e” behaviour, it was possible to tweak things so that the modifier didn’t fire unless there was more than N milliseconds of overlap. That would mean, that if we have the following sequence of events:

D/U down, letter down, D/U up, letter up

Then the firmware would wait a few milliseconds before sending the “letter down” even (or until the dual use key up event, whichever is sooner).

I found that once I got the delay tuned right, it was pretty much undetectable and massively improved my typing accuracy. It’s kind of a more sophisticated debouncing (no, autocorrect, not “denouncing”) algorithm (it would probably be possible to have a universal “de-overlap” plugin that would do this sort of thing for all the keys rather than special casing for dual use).

[Next page](https://community.keyboard.io/t/fast-typing-overlap/788.md?page=2)
