moved click handler

fixes 1 circular dependency
part of #2462
This commit is contained in:
Miodec 2022-02-11 00:47:50 +01:00
parent 56aaa3dc2a
commit 28c7d1a613
2 changed files with 5 additions and 7 deletions

View file

@ -628,3 +628,8 @@ $(document).on("click", "#commandLineMobileButton", () => {
}
show();
});
$(document).on("click", ".keymap .r5 #KeySpace", (e) => {
CommandlineLists.setCurrent([CommandlineLists.commandsKeymapLayouts]);
show();
});

View file

@ -1,8 +1,6 @@
import Config, * as UpdateConfig from "../config";
import * as ThemeColors from "./theme-colors";
import layouts from "../test/layouts";
import * as CommandlineLists from "./commandline-lists";
import * as Commandline from "./commandline";
import * as SlowTimer from "../states/slow-timer";
export function highlightKey(currentKey) {
@ -264,11 +262,6 @@ export function refreshKeys(layout) {
}
}
$(document).on("click", ".keymap .r5 #KeySpace", (e) => {
CommandlineLists.setCurrent([CommandlineLists.commandsKeymapLayouts]);
Commandline.show();
});
$(document).ready(() => {
UpdateConfig.subscribeToEvent((eventKey, eventValue) => {
if (eventKey === "layout" && Config.keymapLayout === "overrideSync")