velxio/frontend/src/utils
David Montero 5218f7314b feat(simulator): map pushbuttons to keyboard keys
Any pushbutton (pushbutton / pushbutton-6mm) can now be driven from the
keyboard. Assign a key from the component property dialog — a keycap
control captures the next keypress (Escape cancels, modifiers alone are
rejected) — and a keycap badge next to the component label shows the
mapping on the canvas. Several buttons may share one key on purpose;
the dialog shows a hint when that happens.

At runtime a global bridge translates keydown/keyup into the same
button-press / button-release DOM events the mouse fires on the wokwi
element, so every simulation path (avr8js pin logic, SPICE-driven
inputs, the QEMU GPIO bridge, the pressed visual) behaves identically
to a mouse click. Guards: ignored while typing in inputs or the code
editor, ignored with Ctrl/Alt/Meta held, auto-repeat collapses into one
long press, and window blur releases everything so no button sticks
after Alt-Tab.

The binding is stored as the component's 'key' property, so it
round-trips through project saves and .vlx exports and is undoable like
any other property edit. Strings added to all 9 locales.
2026-07-18 04:02:01 +02:00
..
analytics.ts
…
boardPinMapping.ts feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
boardProtocols.ts fix(interconnect): classify Arduino Mega UART/I2C function-label pins 2026-06-12 08:29:03 +02:00
breadboardNets.ts feat: breadboard (full 830-point) + mini breadboard (170-point) parts 2026-07-15 21:50:36 +02:00
captureCanvasPreview.ts
…
compilationLogger.ts feat(editor): per-target compilation console — a section per board/chip 2026-06-04 07:56:54 +02:00
countryFlag.ts
…
esp32ImageParser.ts
…
exampleToBuildNetlistInput.ts
…
fatImage.ts feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
firmwareLoader.ts
…
generateExamplePreview.tsx
…
hexParser.ts
…
importProject.ts
…
keyButtonBindings.ts feat(simulator): map pushbuttons to keyboard keys 2026-07-18 04:02:01 +02:00
loadExample.ts feat(library-manifest): per-board manifests + autocomplete 2026-06-07 06:07:48 +02:00
pinPositionCalculator.ts fix(canvas): wires off pins after rotation — wrapper offset was (4,6) instead of (6,6) 2026-05-26 15:16:04 +02:00
projectPayload.ts feat(library-manifest): per-board manifests + autocomplete 2026-06-07 06:07:48 +02:00
reservedUsernames.ts
…
sdCardFiles.ts feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
useSEO.ts seo: emit trailing-slash canonical + sitemap URLs 2026-06-15 06:10:32 +02:00
useTouchDevice.ts
…
uuid.ts
…
vlxFile.ts feat(editor): rename boards & custom chips; show which target owns each file 2026-06-04 06:22:25 +02:00
wireColors.ts
…
wireHitDetection.ts
…
wireUtils.ts
…
wokwiZip.ts
…
workspaceDraft.ts feat(editor): preserve in-progress workspace across a login redirect 2026-07-17 06:27:28 +02:00