aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.js
diff options
context:
space:
mode:
authorNick Coutsos <[email protected]>2021-08-11 21:24:03 -0400
committerNick Coutsos <[email protected]>2021-08-11 21:24:51 -0400
commit0600412d39ec30d448ed79a1b6ed0f439042eaff (patch)
treeb020e0e6d9928349ae9c134c00f57e96fb729bfe /index.js
parent1526da48f44681776e1da217bcd89e7ca21f4739 (diff)
downloadkeymap-editor-0600412d39ec30d448ed79a1b6ed0f439042eaff.tar.gz
keymap-editor-0600412d39ec30d448ed79a1b6ed0f439042eaff.zip
Render human readable keymaps
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.js b/index.js
index 5e73ae2..bd0c4b6 100644
--- a/index.js
+++ b/index.js
@@ -21,8 +21,9 @@ app.use('/application', express.static('application/dist'))
app.get('/keymap', (req, res) => res.json(qmk.loadKeymap()))
app.post('/keymap', (req, res) => {
const keymap = req.body
- const keymapCode = qmk.generateKeymap(keymap)
- const exportStdout = qmk.exportKeymap(keymap, keymapCode, 'flash' in req.query, err => {
+ const layout = qmk.loadLayout()
+ const generatedKeymap = qmk.generateKeymap(layout, keymap)
+ const exportStdout = qmk.exportKeymap(generatedKeymap, 'flash' in req.query, err => {
if (err) {
res.status(500).send(err)
return