Measuring Distances
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key-to-key distance needs a physical pair. Distance from home needs a physical key and its assigned finger.
Key travel
Section titled “Key travel”On QWERTY, kp, then map d over them for a weighted sum:
Layer activators · Keysets
Layer activators
shift_rightshift_leftKeysets
bi.kp.map(d).sumThis 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).sumA chord can contribute multiple keys. The inner map uses each physical key; the outer map weights the complete event.
For compact, or supply zero explicitly with ??:
bi.kp.map(s).compact.sumbi.kp.map(s ?? 0).sumFor a mean, omit the same absent pairs from the denominator or intentionally count them as zeros. Neither operator catches a query error.