Skip to content

feat: Add Form Editor for config.h with QMK define settings#917

Merged
yoichiro merged 1 commit intomainfrom
feature/workbench-config-h-form-editor
Mar 26, 2026
Merged

feat: Add Form Editor for config.h with QMK define settings#917
yoichiro merged 1 commit intomainfrom
feature/workbench-config-h-form-editor

Conversation

@yoichiro
Copy link
Copy Markdown
Collaborator

@yoichiro yoichiro commented Mar 26, 2026

Summary

  • Add a Form Editor tab for config.h files in the workbench, matching the keyboard.json editor pattern
  • Create ConfigHParser service for parsing/generating #define directives (preserves comments, formatting, and non-define lines)
  • Create ConfigHSettingsPanel with 6 vertical tabs: Tap/Hold, Mouse Keys, Combo, Auto Shift, One Shot, Leader Key
  • Implement 2-way binding with 500ms debounce auto-apply (same pattern as keyboard.json Form Editor)
  • Add helper text descriptions for all fields (switches and numeric inputs)
  • Show parse error message when config.h content is invalid
  • Add Japanese translations for all UI labels and descriptions

Test plan

  • Open config.h → verify Code Editor and Form Editor tabs appear
  • Switch to Form Editor → verify Tap/Hold tab displays with all fields
  • Set TAPPING_TERM to 200 → switch to Code Editor → verify #define TAPPING_TERM 200 appears
  • Toggle PERMISSIVE_HOLD on → switch to Code Editor → verify #define PERMISSIVE_HOLD appears
  • Toggle PERMISSIVE_HOLD off → switch to Code Editor → verify the define is removed
  • Edit config.h in Code Editor → switch to Form Editor → verify values are reflected
  • Break config.h syntax in Code Editor → switch to Form Editor → verify error message shown
  • Verify all 6 tabs (Tap/Hold, Mouse Keys, Combo, Auto Shift, One Shot, Leader Key) render correctly
  • Verify helper text descriptions appear for all switches and numeric inputs
  • Verify Japanese locale displays correctly
  • Run ConfigHParser tests (19 tests)

🤖 Generated with Claude Code

Add a form-based editor for config.h files in the workbench, following
the same tab pattern as keyboard.json. Includes ConfigHParser service
for parsing/generating #define directives, and ConfigHSettingsPanel
with 6 category tabs (Tap/Hold, Mouse Keys, Combo, Auto Shift, One Shot,
Leader Key). Features 2-way binding with 500ms debounce, parse error
detection, and helper text descriptions for all fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yoichiro yoichiro merged commit d47b091 into main Mar 26, 2026
1 check passed
@yoichiro yoichiro deleted the feature/workbench-config-h-form-editor branch March 26, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant