<!-- Source: https://medius.k4tech.net/comparison/input -->
# Buttons, keys and locks

Button and key latency, native and injected presses held together, locks on native input, and clicks and typing timed by the box.

## Button and key latency

Injected left button and 'a' key, timed on the PC's USB bus from the command to the clone's report. The mouse was still, moving every millisecond, or moving while the box also injected a move every millisecond.

#### Left button latency, p50

Stock `km.left`Medius `INJECT`

| Load and edge | Stock`km.left` | Medius`INJECT` | Result |
| --- | --- | --- | --- |
| Mouse still, press | 0.723 ms | 0.803 ms | Stock |
| Mouse still, release | 0.867 ms | 0.725 ms | Medius |
| Mouse moving, press | 8.56 ms | 1.39 ms | Medius |
| Mouse moving, release | 8.59 ms | 1.31 ms | Medius |
| Mouse moving, box injecting, press | 8.63 ms | 1.02 ms | Medius |
| Mouse moving, box injecting, release | 8.68 ms | 0.867 ms | Medius |

#### Key latency, p50

Stock `km.down`Medius `INJECT`

| Load and edge | Stock`km.down` | Medius`INJECT` | Result |
| --- | --- | --- | --- |
| Mouse still, down | 1.24 ms | 0.862 ms | Medius |
| Mouse still, up | 1.23 ms | 0.867 ms | Medius |
| Mouse moving, down | 1.26 ms | 0.974 ms | Medius |
| Mouse moving, up | 1.3 ms | 0.978 ms | Medius |
| Mouse moving, box injecting, down | 1.67 ms | 0.972 ms | Medius |
| Mouse moving, box injecting, up | 1.86 ms | 0.783 ms | Medius |

## Native and injected presses

A native key or button held while each box injected another key, or injected a release or click of that same button.

#### Native press after the injection

| Case | Stock | Medius | Result |
| --- | --- | --- | --- |
| Native Q held, box injects A | Still held | Still held | Equal |
| Native left held, box injects a left release | Still held | Still held | Equal |
| Native left held, box injects a left click | Still held | Still held | Equal |

## Locks

Each box held a lock for 10 s against native motion and clicks. On the PC's USB bus, a lock is timed from the command to the last native input through, an unlock to the first one back.

#### Native input reaching the PC

| Lock | Stock | Medius | Result |
| --- | --- | --- | --- |
| X locked, box idle | None | None | Equal |
| X locked, box injecting Y at 1 kHz | None | None | Equal |
| X locked, box injecting Y at 125 Hz | None | None | Equal |
| X locked, box injecting -1 X at 1 kHz | None | None | Equal |
| Left button locked, box idle | None | None | Equal |
| Left button locked, box injecting Y at 1 kHz | None | None | Equal |

#### Injected press reaching the PC

| Lock | Stock | Medius | Result |
| --- | --- | --- | --- |
| Left button locked | Arrives | Arrives | Equal |

#### Lock on X taking effect, p50

Stock `km.lock_mx`Medius `LOCK`

| Lock | Stock`km.lock_mx` | Medius`LOCK` | Result |
| --- | --- | --- | --- |
| Native X motion every millisecond | 3.33-5.62 ms | 0.333-0.471 ms | Medius |

#### Lock on X lifting, p50

Stock `km.lock_mx`Medius `LOCK`

| Lock | Stock`km.lock_mx` | Medius`LOCK` | Result |
| --- | --- | --- | --- |
| Native X motion every millisecond | 4.33-6.41 ms | 1.20-1.29 ms | Medius |

#### Native input still reaching the PC after the lock, p50

| Lock | Stock | Medius | Result |
| --- | --- | --- | --- |
| Y, moving every millisecond | 6.45 ms | 0.336 ms | Medius |
| Positive Y only, moving +1 and -1 | 5.9 ms | 0.363 ms | Medius |
| Wheel, every 10 ms | 0 ms | 0 ms | Equal |
| Right button, 50 ms clicksMedius lets a press already under way finish before the lock blocks the button. The PC never gets a release the real device didn't report | 0 ms | 99.3 ms | Stock |
| Key 'a', 50 ms taps | 0 ms | 0 ms | Equal |
| Right button, heldMedius lets a press already under way finish before the lock blocks the button. The PC never gets a release the real device didn't report | 7.38 ms | 99.4 ms | Stock |
| Key 'a', held | 1.01 ms | 0 ms | Medius |

#### Native input back after the unlock, p50

| Lock | Stock | Medius | Result |
| --- | --- | --- | --- |
| Y, moving every millisecond | 7.21 ms | 1.51 ms | Medius |
| Positive Y only, moving +1 and -1 | 7.61 ms | 1.5 ms | Medius |
| Wheel, every 10 ms | 2.89 ms | 8.02 ms | Stock |
| Right button, 50 ms clicks | 14.9 ms | 0.729 ms | Medius |
| Key 'a', 50 ms taps | 37.1 ms | 0.818 ms | Medius |
| Right button, held | 8.78 ms | 0.586 ms | Medius |
| Key 'a', held | 1.96 ms | 1.32 ms | Medius |

#### Injected counts arriving while a lock is held

Stock `km.move`Medius `MOVE`

| Lock and injection | Stock`km.move` | Medius`MOVE` | Result |
| --- | --- | --- | --- |
| X locked, Y injected at 1 kHz | 9,999/10,000 | 10,000/10,000 | Medius |
| X locked, Y injected at 125 Hz | 1,242/1,250 | 1,250/1,250 | Medius |
| X locked, -1 X injected at 1 kHz | 9,994/10,000 | 10,000/10,000 | Medius |
| Left button locked, Y injected at 1 kHz | 9,989/10,000 | 10,000/10,000 | Medius |

## Clicks and typing timed by the box

Ten 50 ms clicks and a 30-character string timed by the box (stock's km.click and km.string, a Medius clip), against the same clicks timed by the PC. Read off the PC's USB bus, five runs each.

#### Shortest 50 ms click hold

Stock `km.click`Medius `CLIP`

| Timed by | Stock`km.click` | Medius`CLIP` |
| --- | --- | --- |
| The box | 50 ms | 49.7-50.0 ms |
| The PC | 50 ms | 49.9-50.0 ms |

#### Longest 50 ms click hold

Stock `km.click`Medius `CLIP`

| Timed by | Stock`km.click` | Medius`CLIP` |
| --- | --- | --- |
| The box | 50.0-50.1 ms | 50.0-50.1 ms |
| The PC | 50.0-50.1 ms | 50.0-50.1 ms |

#### 30 characters the box typed

Stock `km.string`Medius `CLIP`

| String | Stock`km.string` | Medius`CLIP` | Result |
| --- | --- | --- | --- |
| the quick brown fox 0123456789, 5 runs | Exact | Exact | Equal |

#### Time to type 30 characters

Stock `km.string`Medius `CLIP`

| String | Stock`km.string` | Medius`CLIP` |
| --- | --- | --- |
| First key down to last key up | 2,813-2,982 ms | 57.9-59.0 ms |

#### 30 characters sent by the PC as key presses back to back

Stock `km.down, km.up`Medius `INJECT`

| String | Stock`km.down, km.up` | Medius`INJECT` | Result |
| --- | --- | --- | --- |
| the quick brown fox 0123456789 | Characters lost | Exact | Medius |
