Skip to content

moosylog/basic_edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

⌨️ Basic Edit

Live Demo License: MIT Zero Build

A lightweight, visual editor that serves as a foundation for tinkering with the MoErgo Layout Editor JSON file. By providing the exact hardware geometry coordinates needed to render the physical keyboard matrix on screen, it gives you a great starting point for your project.

It runs entirely in the browser as a single HTML file—no build steps, no package managers, and no local server required.

Basic Edit Screenshot

✨ Features

  • Visual Foundation: The tedious work of mapping physical key coordinates is already done. The app understands the geometry of both the Glove80 and Go60 and automatically displays the correct keyboard canvas based on your loaded JSON.
  • Zero Setup: A complete React application bundled into a single .html file. Just double-click to open it in any modern browser.
  • Split-Pane Architecture: A docked inspector allows you to edit the raw AST (Abstract Syntax Tree) of bindings without occluding the visual keyboard.
  • Advanced ZMK Support: Safely edit root-level behaviors like macros, combos, and holdTaps alongside standard layer bindings.
  • Import & Export: Load an existing MoErgo layout JSON, tweak it visually or via the raw JSON AST, and immediately export the updated file ready for the firmware builder.

🚀 Getting Started

You can try the editor immediately via the Live Demo, or run it locally in seconds:

  1. Clone or download this repository.
  2. Double-click index.html to open it in your web browser.
  3. Click Load JSON Layout and select a valid MoErgo ZMK JSON file.
  4. Select physical keys on the canvas to edit their bindings directly, or use the tabs in the right-hand inspector to edit global Macros, Combos, and Hold-Taps.
  5. Click Export Configuration to download your customized, builder-ready layout.

🛠️ Tech Stack

This project is built using CDN-hosted libraries to maintain strict single-file portability:

Technology Purpose
React 18 UI Components, Context, and State Management
Tailwind CSS Utility-first styling and responsive layout
Babel Standalone In-browser JSX compilation for zero-build execution

🧠 Why "Basic Edit"?

ZMK configurations can get incredibly complex, and rendering a physical split keyboard in a browser usually requires painstakingly plotting CSS coordinates for every single key.

This editor is purposefully "basic" in its architecture. By stripping away heavy build tools like Vite or Webpack, the core logic of mapping the hardware geometry, parsing the MoErgo schema, and rendering the matrix remains completely transparent. It is designed to be highly readable for developers who want a solid visual foundation to learn the schema, build custom layout utilities, or create more beginner-friendly tools for the community.


🏗️ Modifying the Editor

Because everything is contained within one file, hacking on the editor is straightforward. Open index.html in your favorite text editor. The codebase is distinctly organized into four main sections:

  1. Hardware Geometry (The Foundation): The physical coordinate mapping arrays (x, y, rotation, and transform-origin) for the Go60 and Glove80.
  2. Parsers & Helpers: Pure functions that translate complex ZMK syntax into human-readable UI labels.
  3. Components: The React UI building blocks (Keys, Keyboard Canvas, Docked Inspector).
  4. Main App: File I/O, state management, and the master application layout.

📄 License

This project is licensed under the MIT License.

Feel free to fork, modify, and use this geometry and code as a foundation or stepping stone for your own MoErgo configuration utilities and community tools!

About

A single-file, LLM-optimized visual editor and playground for MoErgo keyboard JSON configs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages