render/m3e/m3e_key_face library

Material 3 Expressive key faces (motion brief §2.3 row 1).

  • Press verb: the outline morphs from its resting shape (full round by default, or a Material shape-library shape) to a rounded rectangle with corners of 30 % of the short side, through a cached FlatMorph. Scale 0.97 is applied by the key widget (CalcThemeData.pressScale).
  • Springs: press-in effectsFast; release 800/0.6 drives the scale (it may overshoot), while the corners read the same press clamped to 0, 1, so they never bounce (as Compose's effectsDefault corners).
  • Frame-1 cue: the +10 % state layer, snapped on at touch-down by KeyPressMotion (the tint channel).
  • Reduce Motion: discrete swap to the pressed outline plus the tint.

Classes

M3eKeyFace
M3 Expressive key renderer for one theme.
M3eKeyPainter
Paints one M3 Expressive key: the morphing outline filled with the key colour plus the state layer, an optional outline, and the long-press fill. Repaints from the motion channels; reuses one Path.
M3eLerpKeyFace
An M3 Expressive face part-way through a same-family theme change: resting outlines morph from → to at t (the transition's shape progress; it may pass 1 for the rubber-band). A key pressed during the morph shows the press morph of the nearer theme.