Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhelvy/qmkJsonConverter
R code to convert the .json file from the QMK configurator into a keymap.c file
https://github.com/jhelvy/qmkJsonConverter
Last synced: about 1 month ago
JSON representation
R code to convert the .json file from the QMK configurator into a keymap.c file
- Host: GitHub
- URL: https://github.com/jhelvy/qmkJsonConverter
- Owner: jhelvy
- Created: 2019-11-16T13:26:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-27T17:58:20.000Z (over 4 years ago)
- Last Synced: 2024-08-04T10:03:47.716Z (5 months ago)
- Language: C
- Homepage: https://jhelvy.shinyapps.io/qmkjsonconverter/
- Size: 9.62 MB
- Stars: 14
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
### Overview
This app converts the .json file exported from the [QMK configurator](https://config.qmk.fm/) into the code for the keymap.c file in your QMK settings. Here is the recommended workflow to follow:
1. Go to https://config.qmk.fm and create a keymap for your keyboard
2. Download the .json file and upload it on this app
3. Open the appropriate `keymap.c` file for the desired keyboard you are working on and copy-paste over the formated keymap code
4. Add any other additional features you desire to the keymap.c file### Run locally
The app is hosted for [free online](https://jhelvy.shinyapps.io/qmkJsonConverter/), but you can also run the app locally on your computer by following these steps:
1. Install [R](https://cloud.r-project.org/)
2. Run this code in R to install the [shiny library](https://shiny.rstudio.com/):```
install.packages("shiny")
```3. Run this code in R to launch the app:
```
library(shiny)
runGitHub('jhelvy/qmkJsonConverter')
```### Manual conversion
The underlying R code that makes this app work can also be directly used in R. To run it, follow these steps:
1. Fork or download all the files in this repo.
2. Place the QMK keyboard files you are working with in the `keyboards` folder (e.g. `keyboards/lily58/jhelvy`).
3. Go to https://config.qmk.fm and create a keymap for your keyboard
4. Download the .json file and put in your keymap folder (e.g. `keyboards/lily58/jhelvy`)
5. Open the `qmkJsonConverter.Rproj` project and open the `convert.R` file (you'll need to have [R](https://cloud.r-project.org/) and [RStudio](https://rstudio.com/products/rstudio/download/) installed).
6. Open the `convert.R` script and define the `keyboardName`, `jsonFileName`, and `folderName`
7. Run the whole `convert.R` script
8. Open the resulting .txt file that has now been saved in the same folder where you put the original .json file you downloaded from the QMK configurator
9. Open the appropriate `keymap.c` file for the desired keyboard and copy-paste over the formatted keymap code stored in the .txt file
10. Add any other additional features you desire to the keymap.c file