mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
remove KeyTap() legacy key delay default value and Update godoc
This commit is contained in:
parent
19936348de
commit
19e5617166
@ -355,6 +355,8 @@ func CopyBitPB(bitmap C.MMBitmapRef) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: CopyBitpb copy bitmap to pasteboard, Wno-deprecated
|
// Deprecated: CopyBitpb copy bitmap to pasteboard, Wno-deprecated
|
||||||
|
//
|
||||||
|
// This function will be removed in version v1.0.0
|
||||||
func CopyBitpb(bitmap C.MMBitmapRef) bool {
|
func CopyBitpb(bitmap C.MMBitmapRef) bool {
|
||||||
tt.Drop("CopyBitpb", "CopyBitPB")
|
tt.Drop("CopyBitpb", "CopyBitPB")
|
||||||
return CopyBitPB(bitmap)
|
return CopyBitPB(bitmap)
|
||||||
|
22
robotgo.go
22
robotgo.go
@ -663,7 +663,7 @@ func KeyTap(tapKey string, args ...interface{}) string {
|
|||||||
keyT = "null"
|
keyT = "null"
|
||||||
keyArr []string
|
keyArr []string
|
||||||
num int
|
num int
|
||||||
keyDelay = 10
|
keyDelay int // This is legacy and drop option, use robotgo.KeySleep
|
||||||
)
|
)
|
||||||
|
|
||||||
if _, ok := Special[tapKey]; ok {
|
if _, ok := Special[tapKey]; ok {
|
||||||
@ -891,7 +891,11 @@ func inputUTF(str string) {
|
|||||||
|
|
||||||
// TypeStr send a string, support UTF-8
|
// TypeStr send a string, support UTF-8
|
||||||
//
|
//
|
||||||
// robotgo.TypeStr(string: The string to send, float64: microsleep time, x11)
|
// robotgo.TypeStr(string: The string to send, float64: microsleep time, x11 option)
|
||||||
|
//
|
||||||
|
// Examples:
|
||||||
|
// robotgo.TypeStr("abc@123, hi, こんにちは")
|
||||||
|
//
|
||||||
func TypeStr(str string, args ...float64) {
|
func TypeStr(str string, args ...float64) {
|
||||||
var tm, tm1 = 0.0, 7.0
|
var tm, tm1 = 0.0, 7.0
|
||||||
|
|
||||||
@ -931,7 +935,8 @@ func TypeStr(str string, args ...float64) {
|
|||||||
MilliSleep(KeySleep)
|
MilliSleep(KeySleep)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PasteStr paste a string, support UTF-8
|
// PasteStr paste a string, support UTF-8,
|
||||||
|
// write the string to clipboard and tap `cmd + v`
|
||||||
func PasteStr(str string) string {
|
func PasteStr(str string) string {
|
||||||
err := clipboard.WriteAll(str)
|
err := clipboard.WriteAll(str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -945,8 +950,10 @@ func PasteStr(str string) string {
|
|||||||
return KeyTap("v", "control")
|
return KeyTap("v", "control")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: TypeString send a string, support unicode
|
// Deprecated: TypeString send a string, support unicode(no linux support)
|
||||||
// TypeStr(string: The string to send), Wno-deprecated
|
// TypeStr(string: The string to send), Wno-deprecated
|
||||||
|
//
|
||||||
|
// This function will be removed in version v1.0.0
|
||||||
func TypeString(str string, delay ...int) {
|
func TypeString(str string, delay ...int) {
|
||||||
tt.Drop("TypeString", "TypeStr")
|
tt.Drop("TypeString", "TypeStr")
|
||||||
var cdelay C.size_t
|
var cdelay C.size_t
|
||||||
@ -967,6 +974,8 @@ func TypeStrDelay(str string, delay int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: TypeStringDelayed type string delayed, Wno-deprecated
|
// Deprecated: TypeStringDelayed type string delayed, Wno-deprecated
|
||||||
|
//
|
||||||
|
// This function will be removed in version v1.0.0
|
||||||
func TypeStringDelayed(str string, delay int) {
|
func TypeStringDelayed(str string, delay int) {
|
||||||
tt.Drop("TypeStringDelayed", "TypeStrDelay")
|
tt.Drop("TypeStringDelayed", "TypeStrDelay")
|
||||||
TypeStrDelay(str, delay)
|
TypeStrDelay(str, delay)
|
||||||
@ -978,7 +987,8 @@ func SetKeyDelay(delay int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: SetKeyboardDelay set keyboard delay, Wno-deprecated,
|
// Deprecated: SetKeyboardDelay set keyboard delay, Wno-deprecated,
|
||||||
// this function will be removed in version v1.0.0
|
//
|
||||||
|
// This function will be removed in version v1.0.0
|
||||||
func SetKeyboardDelay(delay int) {
|
func SetKeyboardDelay(delay int) {
|
||||||
tt.Drop("SetKeyboardDelay", "SetKeyDelay")
|
tt.Drop("SetKeyboardDelay", "SetKeyDelay")
|
||||||
SetKeyDelay(delay)
|
SetKeyDelay(delay)
|
||||||
@ -1147,6 +1157,8 @@ func GetHandle() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: GetBHandle get the window handle, Wno-deprecated
|
// Deprecated: GetBHandle get the window handle, Wno-deprecated
|
||||||
|
//
|
||||||
|
// This function will be removed in version v1.0.0
|
||||||
func GetBHandle() int {
|
func GetBHandle() int {
|
||||||
tt.Drop("GetBHandle", "GetHandle")
|
tt.Drop("GetBHandle", "GetHandle")
|
||||||
hwnd := C.bget_handle()
|
hwnd := C.bget_handle()
|
||||||
|
Loading…
Reference in New Issue
Block a user