The handhelds are named for their variant: picocalc-lyra and cardputer-zero
M5Stack makes three Cardputers and only the Zero runs Linux; the PicoCalc takes several cores and only the Luckfox Lyra runs MeshTerm. So the bare names were ambiguous, and every reference to the two devices now carries the variant: the --platform values and MESHTERM_PLATFORM, the Platform constants (PICOCALC_LYRA, CARDPUTER_ZERO), their lane decks and every screen's picocalc_lyra_lane / cardputer_zero_lane, the font inventories, the lane chips' theme styles, the scripts/ folders, the two chrome test files, and the docs and CLAUDE.md that name them. There is no alias: --platform picocalc is refused with the three real choices listed, rather than falling back to the desktop layout. The PicoCalc is auto-detected from its device tree, so it needs nothing. What names hardware or a user's data keeps its name: the PicoCalc keyboard's input-device name, its battery's sysfs supply, and the serial profile the Lyra setup script writes. .gitignore follows the firmware's folder, and the changelog keeps the words each release used. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a4619aa17d
commit
b6e7cd5c16
104 files changed
+587
-542
No files matched your search
@@ -121,7 +121,7 @@ class AboutPage(ScrollScreen):
|
||||
self._doc = doc
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager lane, plus the section step on a page that has sections.
|
||||
|
||||
A left-hand pair rises toward F1, so ``Sect ↑`` sits outside ``Sect ↓`` — the
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ class ChatScreen(Screen):
|
||||
home_end_jumps = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The PicoCalc lane in the transcript's own words: Latest/Oldest, Paths, Retry.
|
||||
|
||||
The shared lane's Shift bank dispatches the plain ``end``/``home`` actions, but
|
||||
|
||||
@@ -532,7 +532,7 @@ class _ConfigMenu(SelectScreen):
|
||||
return splice_hint(base, f"{REVEAL_KEY} {verb} PIN")
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The list's lane with the reveal on F3 — the slot a delete-less list leaves free.
|
||||
|
||||
F1/F2 are this grouped list's section jumps, F4/F5 the pager; F3 is what a select
|
||||
@@ -542,7 +542,7 @@ class _ConfigMenu(SelectScreen):
|
||||
"""
|
||||
from .tui.fkeys import FPair
|
||||
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
if self._conceals:
|
||||
lane[2] = FPair("Hide" if self._revealed else "Reveal", "reveal")
|
||||
return lane
|
||||
|
||||
@@ -491,7 +491,7 @@ class ContactListScreen(SelectScreen):
|
||||
floating = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The select list's lane, with the whole sort added on F3/F8.
|
||||
|
||||
Four columns is a short ring — walking it backwards saves at most two presses, so
|
||||
@@ -510,7 +510,7 @@ class ContactListScreen(SelectScreen):
|
||||
"""
|
||||
from .tui.fkeys import FPair
|
||||
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
descend = self._sort.ascending # ascending now, so the flip lands descending
|
||||
lane[2] = FPair(
|
||||
"Sort →",
|
||||
|
||||
@@ -109,7 +109,7 @@ def _is_frame_bucket(bucket: str) -> bool:
|
||||
def _traffic_chrome(bucket: str) -> tuple[str, str]:
|
||||
"""One traffic bucket's ``(icon, label)`` — the live feed's, from the same function.
|
||||
|
||||
Icons are mapped to single glyphs on PICOCALC via :func:`~meshterm.ui.theme.glyph`.
|
||||
Icons are mapped to single glyphs on PICOCALC_LYRA via :func:`~meshterm.ui.theme.glyph`.
|
||||
"""
|
||||
typename = bucket.split(":", 1)[1] if ":" in bucket else None
|
||||
return payload_marks(typename)
|
||||
@@ -190,7 +190,7 @@ class DashboardScreen(Screen):
|
||||
return " · ".join([*atoms, "Esc back"])
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared lane, dimmed on the same gate the hint above uses, plus the scope cycle.
|
||||
|
||||
The PicoCalc draws no hint line at all — the lane *is* the footer — so the rule
|
||||
|
||||
@@ -86,7 +86,7 @@ class DeviceInfoScreen(ScrollScreen):
|
||||
return " · ".join(atoms)
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager, plus the reveal on F3 — this screen's own verb slot.
|
||||
|
||||
The chip is the only place the PicoCalc can learn the key exists, and it names the
|
||||
|
||||
@@ -79,7 +79,7 @@ class DiagnosticsPage(AboutPage):
|
||||
return f"{scroll}{SAVE_KEY} save · Esc back"
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The About page's lane, with ``Save`` on the slot it leaves free.
|
||||
|
||||
F1/F2 are the section pair and F4/F5 the pager, so F3 is the one free primary slot
|
||||
@@ -88,7 +88,7 @@ class DiagnosticsPage(AboutPage):
|
||||
"""
|
||||
from .tui.fkeys import FPair
|
||||
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
lane[2] = FPair("Save", SAVE_ACTION)
|
||||
return lane
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
"""The handhelds' glyph inventories — the glyph contract.
|
||||
|
||||
The PicoCalc panel draws through the kernel console with one 512-glyph PSF font
|
||||
(``meshterm.psf.gz``, built by ``scripts/picocalc/calculinux-console-font-6x12.sh``): the stock
|
||||
(``meshterm.psf.gz``, built by ``scripts/picocalc-lyra/calculinux-console-font-6x12.sh``): the stock
|
||||
Terminus 6×12 base (a Cyrillic-coverage table — note there are **no accented Latin
|
||||
letters**), the full braille block, MeshTerm's own marks drawn into donor slots, and a
|
||||
few aliases. A character outside this set renders as a blank on the panel, so *nothing
|
||||
outside it may ever be emitted* on the picocalc platform — the render boundary folds
|
||||
outside it may ever be emitted* on the picocalc-lyra platform — the render boundary folds
|
||||
text down to it (:func:`meshterm.ui.theme.fold_text`), and the dual-platform gallery
|
||||
asserts the fold held.
|
||||
|
||||
@@ -17,7 +17,7 @@ codepoints the build script now repurposes, plus the marks it draws in their pla
|
||||
If the build script's ``MARKS``/``DONORS``/``ALIASES`` change, this table must move in
|
||||
the same commit — and vice versa.
|
||||
|
||||
The Cardputer Zero has a contract of its own, :data:`CARDPUTER_CODEPOINTS`: what its console
|
||||
The Cardputer Zero has a contract of its own, :data:`CARDPUTER_ZERO_CODEPOINTS`: what its console
|
||||
host draws, which no kernel caps. :data:`FONTS` names both, for ``Platform.font``.
|
||||
"""
|
||||
|
||||
@@ -118,12 +118,12 @@ CARDPUTER_RANGES: tuple[tuple[int, int], ...] = (
|
||||
# fmt: on
|
||||
|
||||
#: The Cardputer's inventory as one frozen set.
|
||||
CARDPUTER_CODEPOINTS: frozenset[int] = frozenset(
|
||||
CARDPUTER_ZERO_CODEPOINTS: frozenset[int] = frozenset(
|
||||
cp for first, last in CARDPUTER_RANGES for cp in range(first, last + 1)
|
||||
)
|
||||
|
||||
#: Every handheld's glyph inventory, by the name ``Platform.font`` gives it.
|
||||
FONTS: dict[str, frozenset[int]] = {
|
||||
"picocalc": FONT_CODEPOINTS,
|
||||
"cardputer": CARDPUTER_CODEPOINTS,
|
||||
"picocalc-lyra": FONT_CODEPOINTS,
|
||||
"cardputer-zero": CARDPUTER_ZERO_CODEPOINTS,
|
||||
}
|
||||
@@ -265,7 +265,7 @@ class LiveFeedScreen(Screen):
|
||||
floating = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared lane, gated on there being packets to walk.
|
||||
|
||||
Every nav key here moves the *cursor* over the feed rather than a scroll offset,
|
||||
|
||||
@@ -140,7 +140,7 @@ class MapScreen(Screen):
|
||||
find_enabled = True
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
r"""The PicoCalc lane: three ways to frame the view, then the zoom rocker.
|
||||
|
||||
The map is the one screen that repurposes the nav actions wholesale: PgUp/PgDn
|
||||
@@ -1036,7 +1036,7 @@ class MapScreen(Screen):
|
||||
"""Our own node among the markers, or ``None`` when the map can't place us.
|
||||
|
||||
A device with no location fix of its own is simply absent from the marker list, so
|
||||
``You`` has nowhere to go and its chip dims (see :attr:`picocalc_lane`).
|
||||
``You`` has nowhere to go and its chip dims (see :attr:`picocalc_lyra_lane`).
|
||||
"""
|
||||
return next((m for m in self._markers if m.is_self), None)
|
||||
|
||||
@@ -1134,7 +1134,7 @@ class LocationPickScreen(MapScreen):
|
||||
find_enabled = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self): # type: ignore[override]
|
||||
def picocalc_lyra_lane(self): # type: ignore[override]
|
||||
"""The map's lane minus the two verbs a picker has no use for.
|
||||
|
||||
``Frame`` goes because find is off here — nothing can ever be typed to frame, so
|
||||
|
||||
+2
-2
@@ -596,7 +596,7 @@ class _MainMenu(SelectScreen):
|
||||
return mark if title == mark.plain else super().bar_title(title, style)
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The list's own lane, with the way out on F3: ``Quit?`` asks, ``Quit!`` doesn't.
|
||||
|
||||
The PicoCalc has no hint line, so the lane is where the menu's way out has to be
|
||||
@@ -605,7 +605,7 @@ class _MainMenu(SelectScreen):
|
||||
half, F8, leaves without asking — a two-key reach on the menu alone, for the reader
|
||||
who already decided (JP, 2026-09-29).
|
||||
"""
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
lane[2] = FPair("Quit?", "quit", "Quit!", "quit_now")
|
||||
return lane
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class MessagePathsScreen(Screen):
|
||||
return " · ".join(parts)
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager, dimmed while every arrival is already on screen.
|
||||
|
||||
Both banks move the *selection* here — the pager by a windowful, the jumps to the
|
||||
|
||||
@@ -382,7 +382,7 @@ class NodeDetailScreen(Screen):
|
||||
floating = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager over the route list, plus the tab switch on F3.
|
||||
|
||||
The strip shows *that* there are two views; nothing on screen says the key that
|
||||
|
||||
@@ -245,7 +245,7 @@ class PacketEntry:
|
||||
def kind_icon(kind: str) -> str:
|
||||
"""The icon for a packet class (a fallback for unknown classes).
|
||||
|
||||
Returns the emoji on REGULAR; on PICOCALC, the emoji is mapped to a single-cell
|
||||
Returns the emoji on REGULAR; on PICOCALC_LYRA, the emoji is mapped to a single-cell
|
||||
glyph from the 512-glyph font via :func:`~meshterm.ui.theme.glyph`.
|
||||
"""
|
||||
emoji = KIND_ICONS.get(kind, DEFAULT_ICON)
|
||||
@@ -278,7 +278,7 @@ def class_marks(entry: PacketEntry) -> tuple[str, str]:
|
||||
frame arrived in, not the thing it carries; a typename this table has never heard of
|
||||
keeps the fallback mark and shows the raw typename; a class-less frame stays a plain
|
||||
``packet``. Every other kind is its own class (``advert``, ``message``, …) under the
|
||||
shared :data:`KIND_ICONS` glyph. The emoji are mapped to single glyphs on PICOCALC.
|
||||
shared :data:`KIND_ICONS` glyph. The emoji are mapped to single glyphs on PICOCALC_LYRA.
|
||||
"""
|
||||
if entry.kind == "packet":
|
||||
raw = entry.raw if isinstance(entry.raw, dict) else {}
|
||||
@@ -405,7 +405,7 @@ class PacketViewer(Screen):
|
||||
grow_only = True
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager over the body, with the jumps renamed for what they land on.
|
||||
|
||||
Home and End here don't reach the ends of a *body* — they reach the ends of the
|
||||
|
||||
@@ -333,11 +333,12 @@ class RecordScreen(Screen):
|
||||
return ()
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager, dimmed where nothing scrolls, plus the tab switch on F3.
|
||||
|
||||
The chip names the tab it would take you *to*, never the one you are on — the node
|
||||
page's rule (see :attr:`~meshterm.ui.node_detail_screen.NodeDetailScreen.picocalc_lane`).
|
||||
page's rule (see
|
||||
:attr:`~meshterm.ui.node_detail_screen.NodeDetailScreen.picocalc_lyra_lane`).
|
||||
The Area tab is a picture sized to the viewport, so the pager is dim there.
|
||||
"""
|
||||
from .tui.fkeys import FPair, default_lane
|
||||
|
||||
@@ -145,11 +145,11 @@ class RegionMenu(SelectScreen):
|
||||
return current is not None and current.deletable
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The list's lane with ``Read`` on F3 and ``Remove`` behind it."""
|
||||
from .tui.fkeys import FPair
|
||||
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
lane[2] = FPair(
|
||||
"Read",
|
||||
"retry",
|
||||
|
||||
@@ -47,7 +47,7 @@ class RemoteCliScreen(Screen):
|
||||
floating = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The pager over the transcript, with no jumps behind it.
|
||||
|
||||
Home and End never reach the transcript here: they fall through to the compose
|
||||
|
||||
@@ -229,7 +229,7 @@ class AdminMenu(SelectScreen):
|
||||
return splice_hint(base, READ_ONE_HINT) if self._readable_key() else base
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The list's lane with ``Read`` on F3 and ``Forget`` behind it — dim where inert.
|
||||
|
||||
F1/F2 are this grouped list's section jumps and F4/F5 the pager; F3 is the slot a
|
||||
@@ -241,7 +241,7 @@ class AdminMenu(SelectScreen):
|
||||
"""
|
||||
from .tui.fkeys import FPair
|
||||
|
||||
lane = list(super().picocalc_lane)
|
||||
lane = list(super().picocalc_lyra_lane)
|
||||
lane[2] = FPair(
|
||||
"Read",
|
||||
"retry",
|
||||
|
||||
@@ -196,8 +196,8 @@ MESH_THEME = Theme(
|
||||
# #ff6633 holds white text at only 2.9:1, so the chip is that colour a step darker
|
||||
# in OKLab at the same hue and chroma (L 0.70 → 0.62, h 38°): 4.0:1, still a
|
||||
# vermilion — chroma is in gamut all the way down, so nothing greys it to brown.
|
||||
"fkey.chip.cardputer": "bold #ffffff on #e34b0f",
|
||||
"fkey.chip.cardputer.shift": "bold #ffffff on #0f72bd",
|
||||
"fkey.chip.cardputer_zero": "bold #ffffff on #e34b0f",
|
||||
"fkey.chip.cardputer_zero.shift": "bold #ffffff on #0f72bd",
|
||||
# The prose voices — what a markdown page's inline marks are drawn in (see
|
||||
# ui.markdown). Headings borrow the styles the rest of the app already heads
|
||||
# sections with (``brand``, ``accent``), so only the *body* marks need names of
|
||||
@@ -256,8 +256,8 @@ _VT_SLOTS: tuple[tuple[int, str, str], ...] = (
|
||||
#: The custom 16-slot remap P3 originally shipped (tailwind-family RGBs programmed via
|
||||
#: ``setvtrgb``) — **archived, not installed**: JP chose the standard palette but asked
|
||||
#: to keep this in case he changes his mind. Reinstall with
|
||||
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/picocalc/calculinux-console-font-6x12.sh`` (whose opt-in
|
||||
#: block a test keeps byte-identical to :func:`vtrgb_lines`); MESH_THEME_16 would then
|
||||
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/picocalc-lyra/calculinux-console-font-6x12.sh``
|
||||
#: (whose opt-in block a test keeps byte-identical to :func:`vtrgb_lines`); MESH_THEME_16 would then
|
||||
#: want re-tuning against it (see git history at c6485c6 for the matching theme).
|
||||
_VT_SLOTS_CUSTOM: tuple[tuple[int, str, str], ...] = (
|
||||
(0, "background slate", "#0f172a"),
|
||||
@@ -396,8 +396,8 @@ MESH_THEME_16 = Theme(
|
||||
# The Cardputer deck's fills, for name parity: that panel is truecolor, so these
|
||||
# are only its colours' nearest slots — red for the fn key's orange, blue for the
|
||||
# Shift blue.
|
||||
"fkey.chip.cardputer": "bold color(15) on color(1)",
|
||||
"fkey.chip.cardputer.shift": "bold color(15) on color(4)",
|
||||
"fkey.chip.cardputer_zero": "bold color(15) on color(1)",
|
||||
"fkey.chip.cardputer_zero.shift": "bold color(15) on color(4)",
|
||||
# Prose on the console. The page's body text is the default light grey (slot 7),
|
||||
# so emphasis is the one place the VT's bold-is-brightness rule *is* the design:
|
||||
# ``md.strong`` says bold on purpose and lands on white, exactly the step up the
|
||||
|
||||
@@ -249,7 +249,7 @@ class TimeMachineScreen(Screen):
|
||||
return f"↑↓ PgUp/PgDn scroll · w window{scope} · Esc back"
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager, plus the window cycle on F3.
|
||||
|
||||
``w`` is the whole point of this screen — the same history at several spans — and
|
||||
|
||||
@@ -265,7 +265,7 @@ class TracingDialog(Screen):
|
||||
footer_hint = "Enter/Esc abort"
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""No lane: the dialog's only verb is abort, and it already answers to Enter and Esc."""
|
||||
from .tui.fkeys import EMPTY_LANE
|
||||
|
||||
|
||||
+14
-14
@@ -6,7 +6,7 @@
|
||||
belongs to one keyboard is a :class:`LaneDeck`, named by ``Platform.lane_deck``: which
|
||||
keycodes drive the slots, where the chips sit on the row, how they are drawn, and which of
|
||||
a screen's lane definitions it reads. A screen states its lane per deck —
|
||||
``Screen.picocalc_lane``, ``Screen.cardputer_lane`` — and the Cardputer's follows the
|
||||
``Screen.picocalc_lyra_lane``, ``Screen.cardputer_zero_lane`` — and the Cardputer's follows the
|
||||
PicoCalc's until a screen says otherwise. Both decks having five slots is a coincidence of
|
||||
two keyboards, not a rule, and nothing here assumes it: a deck's slot count is its keys.
|
||||
|
||||
@@ -270,8 +270,8 @@ class LaneDeck:
|
||||
#: plain F6-F10, so the Shift bank is keys of its own. Every chip is a 2-cell key caption,
|
||||
#: a space and a 6-cell label; five chips and four 2-cell gaps sum to exactly 53, the
|
||||
#: console's width, with nothing left over.
|
||||
PICOCALC_DECK = LaneDeck(
|
||||
name="picocalc",
|
||||
PICOCALC_LYRA_DECK = LaneDeck(
|
||||
name="picocalc-lyra",
|
||||
keys=(1, 2, 3, 4, 5),
|
||||
shift_keys=(6, 7, 8, 9, 10),
|
||||
captions=("F1", "F2", "F3", "F4", "F5"),
|
||||
@@ -281,35 +281,35 @@ PICOCALC_DECK = LaneDeck(
|
||||
captioned=True,
|
||||
fill="fkey.chip",
|
||||
shift_fill="fkey.chip.shift",
|
||||
read_lane=attrgetter("picocalc_lane"),
|
||||
read_lane=attrgetter("picocalc_lyra_lane"),
|
||||
)
|
||||
|
||||
#: The Cardputer Zero's number keys 4-8, which sit right under the display: Fn+4..8 are
|
||||
#: F4-F8, never the bare digits, since a digit must stay a digit on a screen that takes
|
||||
#: typing (JP, 2026-09-30). The keyboard driver sends Shift as a key of its own, and the
|
||||
#: console host encodes Shift+Fn+4..8 the way xterm encodes Shift+F4..F8, which
|
||||
#: prompt_toolkit reads as F16-F20 — so a desktop terminal with ``--platform cardputer``
|
||||
#: prompt_toolkit reads as F16-F20 — so a desktop terminal with ``--platform cardputer-zero``
|
||||
#: drives the same bank. The chips are laid out exactly as the PicoCalc's — the key's
|
||||
#: caption leading a 6-cell label, nine cells a chip, two between (JP, 2026-09-30) — and
|
||||
#: the Shift bank keeps the same captions, since it is the same keys with Shift held; its
|
||||
#: blue fill is what says so. It reads the PicoCalc's lanes for now (see
|
||||
#: :meth:`~meshterm.ui.tui.screen.Screen.cardputer_lane`).
|
||||
CARDPUTER_DECK = LaneDeck(
|
||||
name="cardputer",
|
||||
#: :meth:`~meshterm.ui.tui.screen.Screen.cardputer_zero_lane`).
|
||||
CARDPUTER_ZERO_DECK = LaneDeck(
|
||||
name="cardputer-zero",
|
||||
keys=(4, 5, 6, 7, 8),
|
||||
shift_keys=(16, 17, 18, 19, 20),
|
||||
captions=("F4", "F5", "F6", "F7", "F8"),
|
||||
shift_captions=("F4", "F5", "F6", "F7", "F8"),
|
||||
columns=PICOCALC_DECK.columns,
|
||||
chip_width=PICOCALC_DECK.chip_width,
|
||||
columns=PICOCALC_LYRA_DECK.columns,
|
||||
chip_width=PICOCALC_LYRA_DECK.chip_width,
|
||||
captioned=True,
|
||||
fill="fkey.chip.cardputer",
|
||||
shift_fill="fkey.chip.cardputer.shift",
|
||||
read_lane=attrgetter("cardputer_lane"),
|
||||
fill="fkey.chip.cardputer_zero",
|
||||
shift_fill="fkey.chip.cardputer_zero.shift",
|
||||
read_lane=attrgetter("cardputer_zero_lane"),
|
||||
)
|
||||
|
||||
#: Every deck, by the name ``Platform.lane_deck`` gives it.
|
||||
DECKS: dict[str, LaneDeck] = {deck.name: deck for deck in (PICOCALC_DECK, CARDPUTER_DECK)}
|
||||
DECKS: dict[str, LaneDeck] = {deck.name: deck for deck in (PICOCALC_LYRA_DECK, CARDPUTER_ZERO_DECK)}
|
||||
|
||||
_DECK: LaneDeck | None = None
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class ProgressScreen(Screen):
|
||||
modal = True # work in flight owns the keyboard; ^W must not unwind out from under it
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""No lane: the dialog is non-interactive, so no key does anything to it."""
|
||||
from .fkeys import EMPTY_LANE
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ class _KeylessDialog(Screen):
|
||||
modal = True
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""No slots: nothing on a prompt pages, jumps, or needs promoting off a chord."""
|
||||
from .fkeys import EMPTY_LANE
|
||||
|
||||
@@ -560,12 +560,12 @@ class ButtonDialog(_KeylessDialog):
|
||||
return [Text(self._prompt, style=self._prompt_style)]
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The caller's lane where one was given, else a prompt's empty one.
|
||||
|
||||
The per-deck definition, as every screen's is; the Cardputer's deck follows it.
|
||||
"""
|
||||
return self._lane if self._lane is not None else super().picocalc_lane
|
||||
return self._lane if self._lane is not None else super().picocalc_lyra_lane
|
||||
|
||||
@property
|
||||
def _button_row_width(self) -> int:
|
||||
|
||||
@@ -143,7 +143,7 @@ class Screen:
|
||||
"""The screen's F-key lane on the active platform (see :mod:`~meshterm.ui.tui.fkeys`).
|
||||
|
||||
Each handheld deals its own: this reads whichever of the screen's lane definitions
|
||||
the platform's deck names (:attr:`picocalc_lane`, :attr:`cardputer_lane`). A
|
||||
the platform's deck names (:attr:`picocalc_lyra_lane`, :attr:`cardputer_zero_lane`). A
|
||||
platform with no lane — the desktop, whose footer is the hint line — gets an empty
|
||||
one. Override the per-deck definitions, never this.
|
||||
"""
|
||||
@@ -153,7 +153,7 @@ class Screen:
|
||||
return EMPTY_LANE if deck is None else deck.read_lane(self)
|
||||
|
||||
@property
|
||||
def cardputer_lane(self):
|
||||
def cardputer_zero_lane(self):
|
||||
"""The screen's lane on the Cardputer Zero: the PicoCalc's, for now.
|
||||
|
||||
JP, 2026-09-30: the Cardputer deals the same entries as the PicoCalc until decided
|
||||
@@ -161,10 +161,10 @@ class Screen:
|
||||
having five slots is a coincidence of two keyboards, so this is the one place the
|
||||
two are tied; a screen whose Cardputer lane should differ overrides this.
|
||||
"""
|
||||
return self.picocalc_lane
|
||||
return self.picocalc_lyra_lane
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The screen's lane on the PicoCalc (see :mod:`~meshterm.ui.tui.fkeys`).
|
||||
|
||||
Five slots, F1–F5, each with an optional F6–F10 Shift-bank companion. A slot is
|
||||
@@ -744,7 +744,7 @@ class ScrollScreen(Screen):
|
||||
"""
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared lane, its nav slots dimmed when the content already fits.
|
||||
|
||||
Every nav key here scrolls and nothing else, so a result window short enough to
|
||||
@@ -850,7 +850,7 @@ class BusyScreen(Screen):
|
||||
modal = True # work in flight owns the keyboard; ^W must not unwind out from under it
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""No lane at all: this screen swallows every key, so none of them do anything."""
|
||||
from .fkeys import EMPTY_LANE
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ class SelectScreen(Screen):
|
||||
_HSCROLL_STEP = 8
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""The shared pager, the section jumps on F1/F2, and row deletion on F3.
|
||||
|
||||
Ctrl+PageUp/PageDown step the highlight heading by heading — and on the PicoCalc
|
||||
@@ -562,7 +562,7 @@ class SelectScreen(Screen):
|
||||
def _all_section_starts(self) -> list[int]:
|
||||
"""The section starts of the *unfiltered* list — whether this list has sections at all.
|
||||
|
||||
The F-key lane needs both questions answered separately (see :attr:`picocalc_lane`):
|
||||
The F-key lane needs both questions answered separately (see :attr:`picocalc_lyra_lane`):
|
||||
a flat list never offers a section jump, while a grouped one whose filter has
|
||||
collapsed it to one section offers it again the moment the filter is edited.
|
||||
"""
|
||||
@@ -1012,7 +1012,7 @@ class ReorderScreen(Screen):
|
||||
_HINT_GRABBED = "↑↓ move row · Enter drop · Esc cancel"
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""No lane: the whole screen is ↑↓ and Enter, three keys already on the keyboard."""
|
||||
from .fkeys import EMPTY_LANE
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ def _reclaim_last_column() -> bool:
|
||||
This is a gate, not a certainty: it is *correct* only when the probe under-reports. On a
|
||||
terminal whose width probe is already right, the extra column falls off the real screen and
|
||||
the frame would wrap and tear — which is exactly PicoCalc's exact-width console, so
|
||||
:data:`~meshterm.platforms.PICOCALC` defaults this off.
|
||||
:data:`~meshterm.platforms.PICOCALC_LYRA` defaults this off.
|
||||
|
||||
Three sources, in confidence order, because the person at the keyboard can see the
|
||||
column and the platform can only guess at it: ``MESHTERM_FULL_WIDTH=0``/``=1`` for a
|
||||
|
||||
@@ -231,7 +231,7 @@ class WalkScreen(Screen):
|
||||
floating = False
|
||||
|
||||
@property
|
||||
def picocalc_lane(self):
|
||||
def picocalc_lyra_lane(self):
|
||||
"""``You`` on the screen's own F3, the shared pager and its two ends on F4/F5.
|
||||
|
||||
``You`` is not an end of the link list — it drops the whole trail and puts the
|
||||
@@ -442,7 +442,7 @@ class WalkScreen(Screen):
|
||||
|
||||
Home/End are the list's own ends here, as on every other scrolling screen; the jump
|
||||
back to our own node is ``locate`` (^Y, and the lane's F3), which is not a place in
|
||||
this list at all — see :attr:`picocalc_lane`.
|
||||
this list at all — see :attr:`picocalc_lyra_lane`.
|
||||
"""
|
||||
rows = self._rows()
|
||||
if action == "escape":
|
||||
|
||||
@@ -130,7 +130,7 @@ async def open_watchtower(ctx: AppContext) -> dict[str, Any] | None:
|
||||
# alert actually overflows the width (see SelectScreen.hscroll_hint) — and it
|
||||
# slides the *message* alone: each row pins its own lanes (see _alert_lanes).
|
||||
# The two section headings below earn the list its ^PgUp/^PgDn jumps and their
|
||||
# F1/F2 chips for free (SelectScreen.picocalc_lane); the hint has no room to name
|
||||
# F1/F2 chips for free (SelectScreen.picocalc_lyra_lane); the hint has no room to name
|
||||
# them beside the ←→ atom, and no other grouped list spells them out either.
|
||||
footer_hint="↑↓ move · Enter select/acknowledge · Esc back",
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user