Skip to content

Commit

Permalink
Merge pull request #551 from go-vgo/bitmap-pr
Browse files Browse the repository at this point in the history
Add: add cmd to the ctrl supported
  • Loading branch information
vcaesar authored Dec 15, 2022
2 parents 3052272 + e8b3975 commit c9e1c3d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
docker:
# using custom image, see .circleci/images/primary/Dockerfile
# - image: govgo/robotgoci:1.10.3
- image: golang:1.19.3
- image: golang:1.19.4
working_directory: /gopath/src/github.com/go-vgo/robotgo
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/primary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM golang:1.10.1
FROM golang:1.19.3-stretch AS build
FROM golang:1.19.4-stretch AS build
# FROM govgo/go:1.11.1

RUN apt update && apt install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ environment:
PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH%
# - COMPILER: MINGW_W64
# ARCHITECTURE: x64
GOVERSION: 1.19.3
GOVERSION: 1.19.4
# GOPATH: c:\gopath

# scripts that run after cloning repository
Expand Down
4 changes: 2 additions & 2 deletions clipboard/cmd/gocopy/gocopy.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package main

import (
"io/ioutil"
"io"
"os"

"github.com/go-vgo/robotgo/clipboard"
)

func main() {
out, err := ioutil.ReadAll(os.Stdin)
out, err := io.ReadAll(os.Stdin)
if err != nil {
panic(err)
}
Expand Down
9 changes: 9 additions & 0 deletions key.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ var keyNames = map[string]C.MMKeyCode{
// { NULL: C.K_NOT_A_KEY }
}

// CmdCtrl If the operating system is macOS, return the key string "cmd",
// otherwise return the key string "ctrl
func CmdCtrl() string {
if runtime.GOOS == "darwin" {
return "cmd"
}
return "ctrl"
}

// It sends a key press and release to the active application
func tapKeyCode(code C.MMKeyCode, flags C.MMKeyFlags, pid C.uintptr) {
C.toggleKeyCode(code, true, flags, pid)
Expand Down

0 comments on commit c9e1c3d

Please sign in to comment.