From 4229362e71f7e011953b61d6c1dacf70bae90efd Mon Sep 17 00:00:00 2001 From: phil294 Date: Sat, 17 Dec 2022 17:13:02 +0100 Subject: [PATCH] fix key name case detection e.g. `{F1}` and `{f1}` refered to shift+f1 and f1, respectively, but there should be no shift fixes #27 --- src/util/ahk-string.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ahk-string.cr b/src/util/ahk-string.cr index da6ad17..93bee87 100644 --- a/src/util/ahk-string.cr +++ b/src/util/ahk-string.cr @@ -110,7 +110,7 @@ class Util::AhkString keysym = Run::X11.ahk_key_name_to_keysym(key_name) # TODO: why the typecheck / why not in x11.cr? raise Run::RuntimeException.new "key name '#{key_name}' not found" if ! keysym || ! keysym.is_a?(Int32) - if key_name.upcase == key_name && key_name.upcase != key_name.downcase + if key_name.size == 1 && key_name.upcase == key_name && key_name.upcase != key_name.downcase modifiers |= ::X11::ShiftMask end