Merge pull request #24 from robotn/test-pr

Fixed all pressed return bug
This commit is contained in:
vz 2020-10-06 11:29:09 -04:00 committed by GitHub
commit 9d1ddf164b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -10,10 +10,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.14
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.15
id: go
- name: Check out code into the Go module directory

View File

@ -34,7 +34,7 @@ environment:
PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH%
# - COMPILER: MINGW_W64
# ARCHITECTURE: x64
GOVERSION: 1.14.6
GOVERSION: 1.15.2
# GOPATH: c:\gopath
# scripts that run after cloning repository

2
go.mod
View File

@ -2,4 +2,4 @@ module github.com/robotn/gohook
go 1.13
require github.com/vcaesar/tt v0.10.0
require github.com/vcaesar/tt v0.10.1

4
go.sum
View File

@ -1,2 +1,2 @@
github.com/vcaesar/tt v0.10.0 h1:jPtFiRRnCOXVakd5ujCed2dwWwTs91wh8W1iHeUIfc0=
github.com/vcaesar/tt v0.10.0/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg=
github.com/vcaesar/tt v0.10.1 h1:0DEl+XkyXivEwb/7jIYhDQ1g7KtMYqD/ZqABcMwC3wo=
github.com/vcaesar/tt v0.10.1/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg=

View File

@ -102,7 +102,9 @@ var (
func allPressed(pressed map[uint16]bool, keys ...uint16) bool {
for _, i := range keys {
// fmt.Println(i)
return !pressed[i]
if !pressed[i] {
return false
}
}
return true