diff --git a/code/duck-typist.js b/code/duck-typist.js index 9b27ff9c..f0b4f2cc 100644 --- a/code/duck-typist.js +++ b/code/duck-typist.js @@ -96,7 +96,8 @@ window.addEventListener('DOMContentLoaded', () => { // fetch a kalamine keyboard layout const fetchLayout = () => { - return fetch(`../layouts/${gLayout.value}.json`) + const selected = gLayout.querySelector(`option[value="${gLayout.value}"`); + return fetch(`../layouts/${selected.dataset.folder}/${gLayout.value}.json`) .then(response => response.json()) .then(layout => { gKeyboard.setKeyboardLayout(layout.keymap, layout.deadkeys, gGeometry.value); diff --git a/www/layouts/shortcodes/x-keyboard.html b/www/layouts/shortcodes/x-keyboard.html index 5296c00e..c92f5076 100644 --- a/www/layouts/shortcodes/x-keyboard.html +++ b/www/layouts/shortcodes/x-keyboard.html @@ -36,7 +36,7 @@ {{ with .Get "data" }} - + {{ end }}