@@ -663,7 +663,7 @@ func KeyTap(tapKey string, args ...interface{}) string {
663663 keyT = "null"
664664 keyArr []string
665665 num int
666- keyDelay = 10
666+ keyDelay int // This is legacy and drop option, use robotgo.KeySleep
667667 )
668668
669669 if _ , ok := Special [tapKey ]; ok {
@@ -891,7 +891,11 @@ func inputUTF(str string) {
891891
892892// TypeStr send a string, support UTF-8
893893//
894- // robotgo.TypeStr(string: The string to send, float64: microsleep time, x11)
894+ // robotgo.TypeStr(string: The string to send, float64: microsleep time, x11 option)
895+ //
896+ // Examples:
897+ // robotgo.TypeStr("abc@123, hi, こんにちは")
898+ //
895899func TypeStr (str string , args ... float64 ) {
896900 var tm , tm1 = 0.0 , 7.0
897901
@@ -931,7 +935,8 @@ func TypeStr(str string, args ...float64) {
931935 MilliSleep (KeySleep )
932936}
933937
934- // PasteStr paste a string, support UTF-8
938+ // PasteStr paste a string, support UTF-8,
939+ // write the string to clipboard and tap `cmd + v`
935940func PasteStr (str string ) string {
936941 err := clipboard .WriteAll (str )
937942 if err != nil {
@@ -945,8 +950,10 @@ func PasteStr(str string) string {
945950 return KeyTap ("v" , "control" )
946951}
947952
948- // Deprecated: TypeString send a string, support unicode
953+ // Deprecated: TypeString send a string, support unicode(no linux support)
949954// TypeStr(string: The string to send), Wno-deprecated
955+ //
956+ // This function will be removed in version v1.0.0
950957func TypeString (str string , delay ... int ) {
951958 tt .Drop ("TypeString" , "TypeStr" )
952959 var cdelay C.size_t
@@ -967,6 +974,8 @@ func TypeStrDelay(str string, delay int) {
967974}
968975
969976// Deprecated: TypeStringDelayed type string delayed, Wno-deprecated
977+ //
978+ // This function will be removed in version v1.0.0
970979func TypeStringDelayed (str string , delay int ) {
971980 tt .Drop ("TypeStringDelayed" , "TypeStrDelay" )
972981 TypeStrDelay (str , delay )
@@ -978,7 +987,8 @@ func SetKeyDelay(delay int) {
978987}
979988
980989// Deprecated: SetKeyboardDelay set keyboard delay, Wno-deprecated,
981- // this function will be removed in version v1.0.0
990+ //
991+ // This function will be removed in version v1.0.0
982992func SetKeyboardDelay (delay int ) {
983993 tt .Drop ("SetKeyboardDelay" , "SetKeyDelay" )
984994 SetKeyDelay (delay )
@@ -1147,6 +1157,8 @@ func GetHandle() int {
11471157}
11481158
11491159// Deprecated: GetBHandle get the window handle, Wno-deprecated
1160+ //
1161+ // This function will be removed in version v1.0.0
11501162func GetBHandle () int {
11511163 tt .Drop ("GetBHandle" , "GetHandle" )
11521164 hwnd := C .bget_handle ()
0 commit comments