Control Edit Screen - cressie176/Load64 GitHub Wiki
Add or edit a control mapping for a controller family or a controller device.
┌──────────────────────────────────────────────────────────────────────────────┐
│ <Owner> > Controls > <Canonical Name> │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ CONTROL EDITOR │
│ ┌────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌─────────────────────────────────────────────────┐ │ │
│ │ Control Name │ _ │ │ │
│ │ └─────────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────────┐ │ │
│ │ Canonical Name │ Button South \/ │ │ │
│ │ └─────────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌───────────────────────────────────────┐ │ │
│ │ Event │ button_0 │ [Capture] │ │
│ │ └───────────────────────────────────────┘ │ │
│ │ │ │
│ │ [Save] [Cancel] │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
│ │
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR │
└──────────────────────────────────────────────────────────────────────────────┘
When capture mode is active:
┌──────────────────────────────────────────────────────────────────────────────┐
│ <Owner> > Controls > <Canonical Name> │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ CONTROL EDITOR │
│ ┌────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌─────────────────────────────────────────────────┐ │ │
│ │ Control Name │ A_ │ │ │
│ │ └─────────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────────┐ │ │
│ │ Canonical Name │ Button South \/ │ │ │
│ │ └─────────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌───────────────────────────────────────┐ │ │
│ │ Event │ Waiting... │ [Cancel] │ │
│ │ └───────────────────────────────────────┘ │ │
│ │ │ │
│ │ [Save] [Cancel] │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
│ │
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR │
│ Press a control to capture. Escape to cancel. │
└──────────────────────────────────────────────────────────────────────────────┘
Focusable: No
Interactive: No
Purpose: Identify the owner of this mapping
<Owner> is the full breadcrumb path to the owner. i.e.
| Owner | Owner Template | Example |
|---|---|---|
| Controller Families | Controller Families > | Controller Families > Logitech > Controls > Button South > Edit |
| Controller | Controllers > | Controllers > Logitech Dual Sense > Controls > Button South > Edit |
Type: Form
Focusable: Yes (primary focus region)
Interactive: Yes
Purpose: Edit the control name, canonical name, and event for a single mapping
Free-text label printed on the physical button (e.g. A). Pre-populated when editing an existing mapping; empty when adding.
Dropdown of all canonical control names displayed in human-readable form (e.g. Button South, D-Pad Up). Behaviour differs by context:
| Context | Behaviour |
|---|---|
| Controller family | Read-only. Set by the entry selected on the Control List screen |
| Controller | Editable. User selects the canonical name to map this control to |
SDL event identifier as reported at runtime (e.g. button_0). This is the string SDL assigns to each physical input — button_0 means the first button reported by SDL for this device. Can be typed directly or populated via [Capture].
Enters capture mode. While active:
- The entire form is non-interactive. No field other than the Event row can be focused or edited.
- LoadC64 listens for the next controller input.
- Both digital (buttons, d-pad) and analog (sticks, triggers) events are accepted. Analog events below a minimum threshold are ignored to filter resting-position noise.
- The first accepted event populates the Event field and exits capture mode automatically, restoring normal form interaction.
- [Cancel] (shown in place of [Capture] while active) or Escape exits capture mode without changing the Event field and restores normal form interaction.
- [Save] saves the mapping and returns to the Control List screen.
- [Cancel] discards changes and returns to the Control List screen.
Focusable: No
Interactive: No
Purpose: Display validation errors and capture mode instructions
When capture mode is active:
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR │
│ Press a control to capture. │
└──────────────────────────────────────────────────────────────────────────────┘
After a validation error:
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR │
│ <Error message> │
└──────────────────────────────────────────────────────────────────────────────┘
| Name | Type | Required | Notes |
|---|---|---|---|
| Control Name | String | Yes | Must be unique within the owner (family or controller) |
| Event | String | Yes | Must map to at most one canonical name within the owner (family or controller) |