diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js index ed2da742a..4d7992a9d 100644 --- a/src/js/commandline-lists.js +++ b/src/js/commandline-lists.js @@ -15,6 +15,7 @@ import * as Funbox from "./funbox"; import * as TagController from "./tag-controller"; import * as Commandline from "./commandline"; import * as CustomText from "./custom-text"; +import { keymapLegendStyles } from "../../static/keymap/legend"; export let current = []; @@ -647,6 +648,33 @@ let commandsKeymapStyle = { ], }; +let commandsKeymapLegendStyle = { + title: "Change keymap legend style...", + list: [ + { + id: "setKeymapLegendStyleLowercase", + display: keymapLegendStyles.lowercase, + exec: () => { + UpdateConfig.setKeymapLegendStyle(keymapLegendStyles.lowercase); + }, + }, + { + id: "setKeymapLegendStyleUppercase", + display: keymapLegendStyles.uppercase, + exec: () => { + UpdateConfig.setKeymapLegendStyle(keymapLegendStyles.uppercase); + }, + }, + { + id: "setKeymapLegendStyleBlank", + display: keymapLegendStyles.blank, + exec: () => { + UpdateConfig.setKeymapLegendStyle(keymapLegendStyles.blank); + }, + }, + ], +}; + let commandsHighlightMode = { title: "Change highlight mode...", list: [ @@ -1678,6 +1706,16 @@ export let defaultCommands = { Commandline.show(); }, }, + { + id: "changeKeymapLegendStyle", + display: "Change keymap legend style...", + alias: "keyboard", + subgroup: true, + exec: () => { + current.push(commandsKeymapLegendStyle); + Commandline.show(); + }, + }, { id: "changeKeymapLayout", display: "Change keymap layout...",