Read /workspaces/learn-p5/src/components/QwertyKeyboard.tsx in full and report:
The toolbar row JSX (the row of buttons above/below the letter keys that contains the "programming/symbol keyboard" toggle button, backspace, newline, etc.). Show the exact line numbers and the full JSX of that toolbar row (~30 line window).
The current ORDER of buttons in the toolbar row — list them in source order. Identify where the symbol-keyboard toggle button (the one calling onToggleProgramming or similar, usually with a "keyboard" or "code" icon) sits.
The styling on the toolbar row container and the toggle button (style names + definitions).
Any "key popup" / preview bubble that appears above a key when tapped — search for "popup", "preview", "pop", "bubble", "tooltip", "Modal", "absolute". Show the JSX + style if it exists. Report whether it currently handles long-press at all.
Any long-press handling on keys (search onLongPress, delayLongPress, Pressable). Show how keys are rendered (the Pressable component used per key).
Report file paths + line numbers + exact code excerpts. Read only, no edits.
Assistant
Assistant
Read-only analysis of /workspaces/learn-p5/src/components/QwertyKeyboard.tsx (559 lines total). Note up front: the actual structure of this component does not match the mental model in your question. There is no single "toolbar row" containing the symbol-keyboard toggle, backspace, and newline. Instead those are split across three different locations. Details below.
1. The "toolbar row" JSX — what actually exists
The only row using the toolbarRow style is rendered at lines 322–362. It contains only a horizontal ScrollView of paired symbols + single symbols — it does not contain the toggle/backspace/enter buttons.
The hidden keyboard / space / toggle to the programming keyboard live instead in the bottomRow at lines 375–442. Backspace and Enter are not in any toolbar — they are action keys embedded directly into ROW1 and ROW2 (see section 2).
2. Current ORDER of buttons
There is no single toolbar to list. The relevant controls live in three separate places:
A. Symbol toolbar row (lines 322–362) — order:
Each item of pairedSymbols (imported from src/data/keyboardLayout, line 7) — rendered as paired-symbol buttons in source order of that array.
Each item of singleSymbols (same import) — appended after the paired ones in source order.
B. Backspace and Enter
These are action keys mixed into the letter rows, not toolbar buttons:
Backspace: last item of ROW1 at line 43 → { type: "action", action: "backspace" }.
Enter: last item of ROW2 at line 56 → { type: "action", action: "enter" }.
Both rendered by renderActionKey (lines 262–296) via renderKey (lines 298–304) inside the rows at lines 365–373.
So the symbol-keyboard toggle button sits LAST in the bottom row, to the right of Space. Its accessibilityLabel is "Switch to programming keyboard" and it uses the MaterialCommunityIcons name "code-tags".
3. Styling on the toolbar row container and toggle button
These look like leftovers from an earlier design that placed fixed buttons inside the toolbar row (i.e. the model from your question). They are currently dead code.
Let me confirm they're unused:
Confirmed: toolbarFixed and toolbarBtn are used only in ProgrammingKeyboard.tsx, not in QwertyKeyboard.tsx. Within QwertyKeyboard.tsx they are dead/unused definitions (the Qwerty file's StyleSheet block defines them but no JSX references styles.toolbarFixed or styles.toolbarBtn).
4. Key popup / preview bubble
A popup preview does exist. It is rendered via renderPopup() at line 321 (just inside the container, above everything else) and defined at lines 166–202:
Position computed from keyLayouts.current[primary] via showPopup (lines 119–130).
It's an absolutely positioned View (uses position: "absolute", zIndex: 100, elevation: 6) — not a Modal.
Shows the secondary glyph of the pressed key (the found.secondary value).
Auto-dismisses after POPUP_DISMISS_DELAY = 800 ms (lines 73, 126–129).
Does it handle long-press?
Yes — long-press is precisely what triggers it. Flow:
handlePressIn (lines 132–140) arms a setTimeout(..., LONG_PRESS_DELAY) where LONG_PRESS_DELAY = 200 (line 72).
When the timer fires (still pressed), it sets longPressActive = true and calls showPopup(key.primary)only if key.secondary exists (line 137). The popup appears above the pressed key.
handlePressOut (lines 142–164) clears timers/state. If it was a long press AND the key has a secondary, it inserts the secondary; otherwise it inserts the primary.
So the popup is the visual indicator of a successful long-press, and on release the long-pressed secondary symbol is inserted. The popup itself does not present a chooser of alternative glyphs — it just previews the one secondary that will be inserted.
5. Long-press handling on keys / Pressable usage
There is no use of onLongPress or delayLongPress props anywhere. Long-press is implemented manually with setTimeout on onPressIn / onPressOut. Constants:
Action keys (backspace / enter) — Pressable at lines 262–296:
These use onPress={onPress} only — no long-press handling at all. They use renderActionKey (lines 262–296), which has no onPressIn/onPressOut. So backspace and enter do not currently support long-press (e.g. no "hold to delete repeatedly" behavior).
Bottom-row buttons (hide / space / toggle) — lines 376–441:
Also plain onPress only — no long-press.
Summary
Toolbar row (styles.toolbarRow, lines 322–362): contains only a horizontal scrolling list of paired + single symbols. It does not contain the toggle/backspace/enter buttons. Unused style leftovers toolbarFixed / toolbarBtn (lines 458–471) suggest this row used to hold fixed buttons.
Toggle button (the code-tags "Switch to programming keyboard" button calling onToggleProgramming): lives at the end of the bottom row (lines 419–441), inline-styled only (no StyleSheet entry).
Backspace / Enter: action keys embedded in ROW1 (line 43) and ROW2 (line 56); rendered via renderActionKey (lines 262–296) with plain onPress (no long-press).
Popup/preview bubble: EXISTS at lines 166–202 (renderPopup) and styles popup/popupText (lines 541–558). It is an absolutely-positioned View (not a Modal) that previews the secondary glyph. It is precisely the visual indicator of a long-press and is handled by long-press via manual setTimeout in handlePressIn (lines 132–140).
Long-press handling: implemented manually with setTimeout on onPressIn/onPressOut (NOT via the onLongPress/delayLongPress Pressable props). LONG_PRESS_DELAY = 200 ms. Only letter keys participate; action keys and bottom-row buttons have no long-press behavior.