Merge pull request #495 from go-vgo/bitmap-pr

Optimize keyboard code and Update examples
This commit is contained in:
Evans 2022-04-09 10:34:10 -07:00 committed by GitHub
commit e533734f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 9 deletions

View File

@ -202,7 +202,7 @@ func main() {
robotgo.TypeStr("だんしゃり", 0, 1)
// robotgo.TypeStr("テストする")
robotgo.TypeStr("Hi, Seattle space needle, Gold gate bridge, One world trade center.")
robotgo.TypeStr("Hi, Seattle space needle, Golden gate bridge, One world trade center.")
robotgo.TypeStr("Hi galaxy, hi stars, hi MT.Rainier, hi sea. こんにちは世界.")
robotgo.Sleep(1)

View File

@ -27,7 +27,7 @@ func typeStr() {
robotgo.TypeStr("So, hi, bye! 你好, 再见!")
robotgo.Sleep(1)
robotgo.TypeStr("Hi, Seattle space needle, Gold gate bridge, One world trade center.")
robotgo.TypeStr("Hi, Seattle space needle, Golden gate bridge, One world trade center.")
robotgo.MilliSleep(100)
ustr := uint32(robotgo.CharCodeAt("So, hi, bye!", 0))

2
key.go
View File

@ -12,7 +12,7 @@ package robotgo
/*
// #include "key/keycode.h"
#include "key/goKey.h"
#include "key/keypress_c.h"
*/
import "C"

View File

@ -1,6 +0,0 @@
// Copyright 2016 The go-vgo Project Developers.
#include <stdlib.h>
#include "../base/types.h"
#include "keypress_c.h"
#include "keycode_c.h"

View File

@ -2,7 +2,10 @@
#ifndef KEYPRESS_H
#define KEYPRESS_H
#include <stdlib.h>
#include "../base/os.h"
#include "../base/types.h"
#include "keycode.h"
#include <stdbool.h>

View File

@ -1,6 +1,7 @@
#include "keypress.h"
#include "../base/deadbeef_rand_c.h"
#include "../base/microsleep.h"
#include "keycode_c.h"
#include <ctype.h> /* For isupper() */
#if defined(IS_MACOSX)