summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/hid.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/share/js/kvm/hid.js')
-rw-r--r--web/share/js/kvm/hid.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index 30cb8690..89a3134c 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -198,12 +198,9 @@ export function Hid(__getGeometry, __recorder) {
};
self.setKeymaps = function(state) {
- let selected = tools.storage.get("hid.pak.keymap", state.keymaps["default"]);
- let html = "";
- for (let variant of state.keymaps.available) {
- html += `<option value=${variant} ${variant === selected ? "selected" : ""}>${variant}</option>`;
- }
- $("hid-pak-keymap-selector").innerHTML = html;
+ let el = $("hid-pak-keymap-selector");
+ tools.selector.setValues(el, state.keymaps.available);
+ tools.selector.setSelectedValue(el, tools.storage.get("hid.pak.keymap", state.keymaps["default"]));
};
var __releaseAll = function() {