Skip to content

Commit

Permalink
fix key name case detection
Browse files Browse the repository at this point in the history
e.g. `{F1}` and `{f1}` refered to shift+f1 and f1, respectively, but there should be no shift

fixes #27
  • Loading branch information
phil294 committed Dec 17, 2022
1 parent 54efeb5 commit 4229362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/ahk-string.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4229362

Please sign in to comment.