README.md 1.77 KB
Newer Older
Anton Lazarev's avatar
Anton Lazarev committed
1 2
# kb-layout-manager
This repository contains an HTML interface and server backend for layout management on antonok's keyboard.
Anton Lazarev's avatar
Anton Lazarev committed
3
More information on the keyboard can be found in [this repository](https://gitlab.com/antonok/kb).
Anton Lazarev's avatar
Anton Lazarev committed
4

Anton Lazarev's avatar
Anton Lazarev committed
5 6
You can view a live demo of the layout manager [here](https://kb.antonok.com).

Anton Lazarev's avatar
Anton Lazarev committed
7
![kb-layout-manager sample usage](https://gitlab.com/antonok/kb-layout-manager/raw/master/sample_usage.png)
Anton Lazarev's avatar
Anton Lazarev committed
8

Anton Lazarev's avatar
Anton Lazarev committed
9
## clientside
Anton Lazarev's avatar
Anton Lazarev committed
10
The layouts for [kb](https://gitlab.com/antonok/kb) are written into C file formats, in the form of multiple 14x5 arrays of various macros denoting different key types.
Anton Lazarev's avatar
Anton Lazarev committed
11 12 13 14 15 16 17
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.
Anton Lazarev's avatar
Anton Lazarev committed
18

Anton Lazarev's avatar
Anton Lazarev committed
19 20 21 22 23 24 25 26 27 28 29
## building
Dependencies are managed using npm.

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

# install dependencies
npm install

30 31 32
# build the clientside resources
npm run build

Anton Lazarev's avatar
Anton Lazarev committed
33
# run the app
34
npm run server
Anton Lazarev's avatar
Anton Lazarev committed
35 36 37 38
```

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

Anton Lazarev's avatar
Anton Lazarev committed
39
Flashing firmware to the keyboard requires [the command-line Teensy loader](https://github.com/PaulStoffregen/teensy_loader_cli) to be installed.
Anton Lazarev's avatar
Anton Lazarev committed
40

Anton Lazarev's avatar
Anton Lazarev committed
41 42
## license
kb-layout-manager is licensed under GPLv3. See LICENSE for more information.