コンテンツにスキップ

Measuring Distances

このコンテンツはまだ日本語訳がありません。

Key-to-key distance needs a physical pair. Distance from home needs a physical key and its assigned finger.

On QWERTY, spans one key unit. Project pairs with kp, then map d over them for a weighted sum:

レイヤートリガー · キー集合

レイヤートリガー

MOshift次の打鍵の条件:shift_right
MOshift次の打鍵の条件:shift_left

キー集合

shift_right右手のキー・除外:
shift_left左手のキー
bi.kp.map(d).sum

This returns a weighted total. For a mean, divide by bi.kp.map(1).sum, which uses map(...).sum to count those pairs by weight.

To see how far the opening press of a bigram moves from home, measure each key pressed in the first event from its assigned finger’s home by mapping hd on the local keys of the first event:

uni.map(first.keys(events:press).map(hd).sum).sum

A chord can contribute multiple keys. The inner map uses each physical key; the outer map weights the complete event.

For , lateral stretch for the same-finger pair is undefined. Omit those results with compact, or supply zero explicitly with ??:

bi.kp.map(s).compact.sum
bi.kp.map(s ?? 0).sum

For a mean, omit the same absent pairs from the denominator or intentionally count them as zeros. Neither operator catches a query error.