Repository navigation
Expand file tree
/
Copy pathRemoteDesktop.cs
More file actions
65 lines (59 loc) · 1.9 KB
/
Copy pathRemoteDesktop.cs
File metadata and controls
65 lines (59 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System.Collections.Generic;
namespace NETworkManager.Models.RemoteDesktop;
public static class RemoteDesktop
{
public static List<string> ScreenResolutions =>
[
"640x480",
"800x600",
"1024x768",
"1280x720",
"1280x768",
"1280x800",
"1280x1024",
"1366x768",
"1440x900",
"1400x1050",
"1680x1050",
"1920x1080"
];
public static List<int> ColorDepths =>
[
15,
16,
24,
32
];
public static RemoteDesktopKeystrokeInfo GetKeystroke(Keystroke keystroke)
{
RemoteDesktopKeystrokeInfo info = new();
switch (keystroke)
{
case Keystroke.CtrlAltDel:
info.ArrayKeyUp = [false, false, false, true, true, true];
info.KeyData = [0x1d, 0x38, 0x53, 0x53, 0x38, 0x1d];
break;
case Keystroke.TaskManager: // Ctrl + Shift + Esc
info.ArrayKeyUp = [false, false, false, true, true, true];
info.KeyData = [0x1d, 0x2a, 0x01, 0x01, 0x2a, 0x1d];
break;
case Keystroke.Lock: // Win + L
info.ArrayKeyUp = [false, false, true, true];
info.KeyData = [0x15b, 0x26, 0x26, 0x15b];
break;
case Keystroke.ShowDesktop: // Win + D
info.ArrayKeyUp = [false, false, true, true];
info.KeyData = [0x15b, 0x20, 0x20, 0x15b];
break;
case Keystroke.Explorer: // Win + E
info.ArrayKeyUp = [false, false, true, true];
info.KeyData = [0x15b, 0x12, 0x12, 0x15b];
break;
case Keystroke.RunDialog: // Win + R
info.ArrayKeyUp = [false, false, true, true];
info.KeyData = [0x15b, 0x13, 0x13, 0x15b];
break;
}
return info;
}
}