Add the argument to ignore CAPS LOCK

This commit is contained in:
Stasky745 2024-05-17 17:17:00 +02:00
parent 4d161f8583
commit 60a262fb39
1 changed files with 6 additions and 9 deletions

View File

@ -90,15 +90,6 @@ local function launch(args)
local ignore_case = args.ignore_case or true local ignore_case = args.ignore_case or true
if ignore_case then
onlogout_key = string.lower(onlogout_key)
onlock_key = string.lower(onlock_key)
onreboot_key = string.lower(onreboot_key)
onsuspend_key = string.lower(onsuspend_key)
onpoweroff_key = string.lower(onpoweroff_key)
all_keys = string.lower(all_keys)
end
w:set_bg(bg_color) w:set_bg(bg_color)
if #phrases > 0 then if #phrases > 0 then
phrase_widget:set_markup( phrase_widget:set_markup(
@ -162,6 +153,12 @@ local function launch(args)
else else
if ignore_case then if ignore_case then
key = string.lower(key) key = string.lower(key)
onlogout_key = string.lower(onlogout_key)
onlock_key = string.lower(onlock_key)
onreboot_key = string.lower(onreboot_key)
onsuspend_key = string.lower(onsuspend_key)
onpoweroff_key = string.lower(onpoweroff_key)
all_keys = string.lower(all_keys)
end end
if key == onpoweroff_key then onpoweroff() if key == onpoweroff_key then onpoweroff()