From 3850eedddc7af91afc77e746a61d5afa3eb82b35 Mon Sep 17 00:00:00 2001 From: flareseek Date: Tue, 29 Apr 2025 01:59:19 +0900 Subject: [PATCH 1/2] feat(hyper): support array of keys for confirm_key --- lua/dashboard/theme/hyper.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/dashboard/theme/hyper.lua b/lua/dashboard/theme/hyper.lua index ff2c0f3..c8da922 100644 --- a/lua/dashboard/theme/hyper.lua +++ b/lua/dashboard/theme/hyper.lua @@ -538,7 +538,11 @@ local function theme_instance(config) load_packages(config) gen_center(plist, config) gen_footer(config) - map_key(config, config.confirm_key or '') + local confirm_keys = type(config.confirm_key) == 'table' and config.confirm_key + or { config.confirm_key or '' } + for _, key in ipairs(confirm_keys) do + map_key(config, key) + end require('dashboard.events').register_lsp_root(config.path) local size = math.floor(vim.o.lines / 2) - math.ceil(api.nvim_buf_line_count(config.bufnr) / 2) From bfe38cac7b43ea91c1f3184977969e25fb4ff8ff Mon Sep 17 00:00:00 2001 From: flareseek Date: Tue, 29 Apr 2025 02:28:47 +0900 Subject: [PATCH 2/2] feat(hyper): add confirm_key entries to used_keys array --- lua/dashboard/theme/hyper.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/dashboard/theme/hyper.lua b/lua/dashboard/theme/hyper.lua index c8da922..8dd05a2 100644 --- a/lua/dashboard/theme/hyper.lua +++ b/lua/dashboard/theme/hyper.lua @@ -239,6 +239,12 @@ local function letter_hotkey(config) end end + local confirm_keys = type(config.confirm_key) == 'table' and config.confirm_key + or { config.confirm_key } + for _, key in ipairs(confirm_keys) do + table.insert(used_keys, key:byte()) + end + math.randomseed(os.time()) -- Create key table, fill it with unused characters.