Skip to content

Commit

Permalink
feat: LWIN+RETURN => 눌린 키 맵 초기화
Browse files Browse the repository at this point in the history
  • Loading branch information
codepage949 committed Jul 13, 2022
1 parent 4e8de86 commit 2658518
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func keyboardHook(nCode int32, wParam uintptr, lParam unsafe.Pointer) uintptr {
otherPressedCount += 1
otherPressedMap[kb.VkCode] = true
}

// NOTE: LWIN+RETURN => 눌린 키 맵 초기화
if otherPressedMap[winapi.VK_LWIN] && otherPressedMap[winapi.VK_RETURN] {
otherPressedCount = 0
otherPressedMap = map[uint32]bool{}
}
} else { // NOTE: WM_*UP
if otherPressedMap[kb.VkCode] {
otherPressedCount -= 1
Expand Down
2 changes: 2 additions & 0 deletions winapi/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ const (
IMC_SETCONVERSIONMODE = 2
CFS_EXCLUDE = 0x80
HC_ACTION = 0
VK_LWIN = 0x5B
VK_RETURN = 0xD
)

0 comments on commit 2658518

Please sign in to comment.