From 7e40b96d51826d80a39d95a0c6dd410ba0693740 Mon Sep 17 00:00:00 2001 From: vCaesar Date: Sun, 11 Dec 2016 17:14:14 +0800 Subject: [PATCH] Add SetKeyDelay and Update Doc --- doc.md | 8 +++++--- robotgo.go | 6 ++++++ window/process.h | 2 +- window/window.h | 2 +- zh_doc.md | 10 ++++++---- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/doc.md b/doc.md index 3854980..d18f60b 100644 --- a/doc.md +++ b/doc.md @@ -3,7 +3,8 @@ ##[Keyboard](#Keyboard) #####[Keys](#keys) -#####[SetKeyboardDelay](#SetKeyboardDelay) +#####[SetKeyboardDelay](#SetKeyDelay)(Equivalent to SetKeyDelay) +#####[SetKeyDelay](#SetKeyDelay) #####[KeyTap](#KeyTap) #####[KeyToggle](#KeyToggle) #####[TypeString](#TypeString) @@ -58,7 +59,7 @@ ##

Keyboard

-###

.SetKeyboardDelay(ms)

+###

.SetKeyDelay(ms)

Sets the delay in milliseconds to sleep after a keyboard event. This is 10ms by default. @@ -260,7 +261,8 @@ robotgo.ScrollMouse(50, "down") Gets part or all of the screen. - Capture_Screen Returns a go struct + BCaptureScreen Returns a go struct + Capture_Screen(Drop support) ####Arguments: diff --git a/robotgo.go b/robotgo.go index 78be6ad..8bd8883 100644 --- a/robotgo.go +++ b/robotgo.go @@ -412,6 +412,12 @@ func TypeStringDelayed(x string, y int) { defer C.free(unsafe.Pointer(cx)) } + +//SetKeyDelay Set Keyboard Delay +func SetKeyDelay(x int) { + C.aSetKeyboardDelay(C.size_t(x)) +} + //SetKeyboardDelay Set Keyboard Delay func SetKeyboardDelay(x int) { C.aSetKeyboardDelay(C.size_t(x)) diff --git a/window/process.h b/window/process.h index ecbe46e..0324967 100644 --- a/window/process.h +++ b/window/process.h @@ -1,6 +1,6 @@ // Copyright 2016 The go-vgo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at -// http://www. +// https://github.com/go-vgo/robotgo/blob/master/LICENSE // // Licensed under the Apache License, Version 2.0 or the MIT license diff --git a/window/window.h b/window/window.h index 0a5d945..3e9da69 100644 --- a/window/window.h +++ b/window/window.h @@ -1,6 +1,6 @@ // Copyright 2016 The go-vgo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at -// http://www. +// https://github.com/go-vgo/robotgo/blob/master/LICENSE // // Licensed under the Apache License, Version 2.0 or the MIT license diff --git a/zh_doc.md b/zh_doc.md index 383eece..eefcd1b 100644 --- a/zh_doc.md +++ b/zh_doc.md @@ -3,7 +3,8 @@ ##[键盘](#Keyboard) #####[Keys](#keys) -#####[SetKeyboardDelay](#SetKeyboardDelay) +#####[SetKeyboardDelay](#SetKeyDelay)(相当于SetKeyDelay) +#####[SetKeyDelay](#SetKeyDelay) #####[KeyTap](#KeyTap) #####[KeyToggle](#KeyToggle) #####[TypeString](#TypeString) @@ -40,7 +41,7 @@ ##[事件](#Event) -#####[LEvent](#LEvent)(相当于AddEvent) +#####[LEvent](#AddEvent)(相当于AddEvent) #####[AddEvent](#AddEvent) ##[窗口](#Window) @@ -57,7 +58,7 @@ ##

键盘

-###

.SetKeyboardDelay(ms)

+###

.SetKeyDelay(ms)

设置键盘延迟(在键盘一个事件后),单位ms,默认值10ms Sets the delay in milliseconds to sleep after a keyboard event. This is 10ms by default. @@ -274,7 +275,8 @@ robotgo.ScrollMouse(50, "down") 获取部分或者全部屏幕 Gets part or all of the screen. - Capture_Screen Returns a go struct + BCaptureScreen Returns a go struct + Capture_Screen(Drop support) ####参数: