Skip to content

Commit

Permalink
fix: capslock send lower case letters
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Sep 8, 2024
1 parent b23b049 commit 2295e9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Rime
Data
test.ahk
*.exe
*.dll
*.ico
Expand Down
5 changes: 5 additions & 0 deletions Rabbit.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ ProcessKey(key, mask, this_hotkey) {
if not code
return

if caps := GetKeyState("CapsLock", "T") {
if StrLen(key) == 1 and Ord(key) >= Ord("a") and Ord(key) <= Ord("z") ; small case letters
code += (Ord("A") - Ord("a"))
}

if status := rime.get_status(session_id) {
local old_schema_id := status.schema_id
local old_ascii_mode := status.is_ascii_mode
Expand Down

0 comments on commit 2295e9e

Please sign in to comment.