Skip to content

ncl: TH portion transparency and hold.tlex - #703

Open
rgoulter wants to merge 1 commit into
masterfrom
feat/tlex-th-portions
Open

ncl: TH portion transparency and hold.tlex#703
rgoulter wants to merge 1 commit into
masterfrom
feat/tlex-th-portions

Conversation

@rgoulter

@rgoulter rgoulter commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

FAK-shaped tap-hold portion handling on layered columns:

  • K.trans — portion transparency (hold.trans / tap.trans): project the hold or tap binding from the column below (layer stays on).
  • K.hold K.tlexhold.tlex: project hold from below into a nested LayeredKey continuation (tlex hole on the defining layer) so hold resolve deactivates that layer and registers the hold from below.

Nickel column lower only; no new Ref family.

Stack

PR 3 of 3 — base: master (after #701 and #702)

  1. layered: bare transparent layer exit (K.tlex) #701 — bare tlex (merged)
  2. ncl: exit_on_transparent as layer-row map sugar #702K.exit_on_transparent layer map (merged)
  3. This PR — TH transparency + hold.tlex

Test plan

  • cargo test -p smart-keymap --test rust-integration layered::tlex (6 tests)
  • CI green

@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch from 373b424 to 7ecbccb Compare August 16, 2026 05:41
@rgoulter
rgoulter force-pushed the feat/tlex-exit-on-transparent branch from 9c78724 to 6bf1ecc Compare August 16, 2026 05:41
@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch from 7ecbccb to bb6bdb5 Compare August 16, 2026 07:06
@rgoulter
rgoulter force-pushed the feat/tlex-exit-on-transparent branch 2 times, most recently from 5a63f62 to 464a7cc Compare August 16, 2026 07:06
@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch 2 times, most recently from 717e712 to fe070e9 Compare August 16, 2026 07:14
@rgoulter
rgoulter force-pushed the feat/tlex-exit-on-transparent branch from 464a7cc to 4e6d04c Compare August 16, 2026 07:14
@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch from fe070e9 to 2e42119 Compare August 16, 2026 07:22
@rgoulter
rgoulter force-pushed the feat/tlex-exit-on-transparent branch 2 times, most recently from b5ada7c to 87cf3df Compare August 16, 2026 07:35
@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch 2 times, most recently from 7620795 to 405cfe3 Compare August 16, 2026 08:25
@rgoulter
rgoulter force-pushed the feat/tlex-exit-on-transparent branch from 87cf3df to 84dc1fe Compare August 16, 2026 08:25
Base automatically changed from feat/tlex-exit-on-transparent to master August 16, 2026 08:52
Add K.trans; lower hold.trans / tap.trans by projecting the column below.
hold.tlex becomes a nested LayeredKey continuation (projected hold + tlex
hole) so hold resolve deactivates the defining layer and registers the
hold from below (FAK hold.tlex).
@rgoulter
rgoulter force-pushed the feat/tlex-th-portions branch from 405cfe3 to b722071 Compare August 16, 2026 09:43
Comment on lines +64 to +67
# Portion transparency (FAK tap.trans / hold.trans): not a whole-cell hole.
# Use as TH child, e.g. `K.J & K.hold K.trans` or `K.trans & K.hold K.LeftShift`.
# Lowered by column projection before JSON (see lower_th_portions).
trans = { transparent = true },

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm.

May be acceptable.

But, since layer transparency uses null otherwise, this is a bit unintuitive.

Comment on lines +438 to +449
if is_trans_key hold_child then
if below == null then
std.fail_with "hold.trans: nothing below to project"
else
project_hold below
else if is_tlex_key hold_child then
if below == null then
std.fail_with "hold.tlex: nothing below to project"
else
continuation_with_exit (project_hold below) layer_idx
else
hold_child

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets quite nested; but I reckon that e.g. match would be simpler to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant