Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.18 KB

README.md

File metadata and controls

53 lines (37 loc) · 2.18 KB

kb-layout-manager

This repository contains an HTML interface and server backend for layout management on antonok's keyboard. More information on the keyboard can be found in this repository.

You can view a live demo of the layout manager here.

kb-layout-manager sample usage

clientside

The layouts for kb are written into C file formats, in the form of multiple 14x5 arrays of various macros denoting different key types. Editing arrays of this size with variable data in plain-text is very hard to visualize and navigate. kb-layout-manager provides a clean, modern, and intuitive method for editing and creating new layouts.

serverside

On its own, a web interface has no way of interfacing with the computer's filesystem, compiling C code, or flashing firmware to hardware. The backend server for kb-layout-manager is written in NodeJS and is meant to be run locally on the user's computer, allowing automatic file loading, backups, compilation, and firmware flashing. The web client uses websockets to automatically connect to the server whenever it is running.

building

Dependencies are managed using npm.

# get the code
git clone https://gitlab.com/antonok/kb-layout-manager
cd kb-layout-manager

# install dependencies
npm install

# build the clientside resources
npm run build

# run the app
npm run server

The layout manager will be accessible on localhost at port 17407.

Flashing firmware to the keyboard requires the command-line Teensy loader to be installed.

demo mode

Build the frontend in "demo mode" by setting the KB_LAYOUT_MANAGER_DEMO_MODE environment variable; e.g.

KB_LAYOUT_MANAGER_DEMO_MODE=1 npm run build

This will prevent websocket code from being imported, reducing JS bundle size and allowing the site to be served as static files from the dist directory. Serverside operations like compiling and flashing will be disabled in demo mode.

license

kb-layout-manager is licensed under GPLv3. See LICENSE for more information.