We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. Cannot type uppercase symbols:
using Desktop.Robot; using Desktop.Robot.Extensions; using System.Text.RegularExpressions; DoTask(); void DoTask() { const string s1 = "~!@#$%^&*()_+{}|:\"<>?"; const string s2 = "VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: \"\" << >> ??"; var robot = new Robot(); robot.AutoDelay = 10; string s; Console.WriteLine("Hello world!\n"); Console.WriteLine($"String to type 1:\n{s1}\n"); Console.WriteLine($"String to type 2:\n{s2}\n"); Task.Run(async () => { await Task.Delay(1000); s = s1; robot.Type(s); robot.Type(" "); // Insert from clipboard robot.KeyDown(Key.Shift); robot.KeyPress(Key.Insert); robot.KeyPress(Key.Insert); robot.KeyPress(Key.Insert); robot.KeyUp(Key.Shift); robot.Type(" "); s = s2; for (int i = 0; i < s.Length; i++) { if (IsUpperSymbol(s[i]) || Regex.IsMatch(s[i].ToString(), "[A-Z]")) { robot.KeyDown(Key.Shift); robot.KeyPress(s[i]); robot.KeyUp(Key.Shift); } else { robot.KeyPress(s[i]); } } robot.KeyPress(Key.Enter); }); s = Console.ReadLine(); Console.WriteLine($"\nEntered string is:\n{s}"); } bool IsUpperSymbol(char ch) { bool res = false; char[] chars = { '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?' }; foreach (var c in chars) { if (c == ch) { res = true; break; } } return res; }
Windows output (clipboard = #):
Hello world!
String to type 1: ~!@#$%^&*()_+{}|:"<>?
String to type 2: VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
`1234567890-=[];',./ ### VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
Entered string is: `1234567890-=[];',./ ### VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
Linux, Centos 8 output (clipboard = $):
No protocol specified `12345678()-=[];<./ VaLeri=buHattI=2022 `` 11 22 33 44 55 66 77 88 (( )) -- == [[ ]] \ ;; << .. //
Entered string is: `12345678()-=[];<./ VaLeri=buHattI=2022 `` 11 22 33 44 55 66 77 88 (( )) -- == [[ ]] \ ;; << .. //
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi.
Cannot type uppercase symbols:
Hello world!
String to type 1:
~!@#$%^&*()_+{}|:"<>?
String to type 2:
VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
`1234567890-=[];',./ ### VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
Entered string is:
`1234567890-=[];',./ ### VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
Hello world!
String to type 1:
~!@#$%^&*()_+{}|:"<>?
String to type 2:
VaLeri+buHattI+2022 ~~ !! @@ ## $$ %% ^^ && ** (( )) __ ++ {{ }} || :: "" << >> ??
No protocol specified
`12345678()-=[];<./ VaLeri=buHattI=2022 `` 11 22 33 44 55 66 77 88 (( )) -- == [[ ]] \ ;; << .. //
Entered string is:
`12345678()-=[];<./ VaLeri=buHattI=2022 `` 11 22 33 44 55 66 77 88 (( )) -- == [[ ]] \ ;; << .. //
The text was updated successfully, but these errors were encountered: