Visual-collapse pass: given a list of route strings, fold pairs that
differ ONLY in shift presence (one has +shift, the other doesn't,
everything else identical) into a single route with ?shift. Useful
for inspector / palette displays that want to show "Cmd+[" and
"Cmd+Shift+[" as one Cmd+?Shift+[ chip rather than two rows.
Preserves input order — the first member of each fold-pair holds the
position; the second is dropped. Routes that don't have a +shift
vs absent twin pass through unchanged. Does NOT fold other modifier
pairs (alt/ctrl/meta/mod) — those tend to carry meaning across the
same key (e.g., Cmd+Z vs Cmd+Shift+Z are usually two distinct
actions, but Cmd+] vs Cmd+Shift+] is more often parametric variation
of one action). Open the helper if a use case for the other
modifiers shows up.
Visual-collapse pass: given a list of route strings, fold pairs that differ ONLY in
shiftpresence (one has+shift, the other doesn't, everything else identical) into a single route with?shift. Useful for inspector / palette displays that want to show "Cmd+[" and "Cmd+Shift+[" as one Cmd+?Shift+[ chip rather than two rows.Preserves input order — the first member of each fold-pair holds the position; the second is dropped. Routes that don't have a
+shiftvs absent twin pass through unchanged. Does NOT fold other modifier pairs (alt/ctrl/meta/mod) — those tend to carry meaning across the same key (e.g., Cmd+Z vs Cmd+Shift+Z are usually two distinct actions, but Cmd+] vs Cmd+Shift+] is more often parametric variation of one action). Open the helper if a use case for the other modifiers shows up.