| **Fn+Esc** | lock / unlock the device (single press, works in both directions) |
Fn+Esc rather than the adjacent Fn+Backspace on purpose: Fn and Backspace sit
next to each other on CardKB's layout and would be far too easy to hit by
accident. See [Screen Lock](./screen_lock/screen_lock.md) for the physical
button equivalent.
### Ext. KB — Full vs Compact
**Settings › Keyboard › Ext. KB** picks how the on-screen keyboard behaves while
a CardKB is doing the typing.
| Mode | Behaviour |
| ---- | --------- |
| **Full** (default) | The letter grid stays on screen. Arrows and Enter drive the grid exactly as physical buttons do, so CardKB and the joystick can be used interchangeably. |
| **Compact** | The grid, the special-row icons and the status line are all hidden — only the text being typed and two shortcut hints remain. Arrows move the **text cursor** directly, and plain Enter submits the field (same as Fn+Enter). |
**Compact is designed to need no joystick at all**, which makes it the right
choice on a board where CardKB is the only input device — for example a Heltec
V3/V4 with no joystick soldered on. In that case set it once and forget it.
Cursor mode and the accent / placeholder popups draw their own visible feedback,
so they behave identically in both modes.
---
## Wired joystick
Four direction contacts plus a separate Back button. Each contact simply shorts
its pin to ground — the firmware enables the internal pull-ups, so no external
resistors are needed.
- The board's existing user button (PRG on the Heltec boards) stays the
centre / Enter press.
- Back is **not** optional: the UI uses it unconditionally once the joystick is
enabled. Triple-clicking Back toggles the buzzer.
- **Settings › Display › Joystick rotation** rotates the direction mapping at
runtime (0–3), for a stick mounted sideways in a custom enclosure. It is
independent of display rotation.
---
## Wiring (Heltec V3 / V4)
Neither board ships with a joystick or a keyboard header, so both are soldered to
free GPIOs. V3 and V4 are pin-compatible per Heltec's documentation and the solo
builds use the same assignment for both — **confirmed working on real V4
hardware**; still worth checking against your own V3 module before soldering.
| Function | GPIO | Notes |
| -------- | ---- | ----- |
| CardKB SDA | 3 | second I2C bus (`Wire1`) — *not* the OLED's 17/18 |
| CardKB SCL | 4 | |
| Joystick UP | 23 | |
| Joystick DOWN | 6 | |
| Joystick LEFT | 47 | |
| Joystick RIGHT | 48 | |
| Back button | 33 | required when the joystick is enabled |
| Centre / Enter | 0 | the onboard PRG button — nothing to wire |
Everything above lives in the `[env:Heltec_v3_companion_solo_dual]` /