Subversion Repositories group.electronics

Rev

Rev 174 | Rev 177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 176
Line 50... Line 50...
50
            return cmd + " " + base.value + "\n";
50
            return cmd + " " + base.value + "\n";
51
        }
51
        }
52
    }
52
    }
53
 
53
 
54
    public class CommandVKey : Command {
54
    public class CommandVKey : Command {
55
        VirtualKeyCode key;
55
        OSInput osi;
56
 
-
 
57
        public CommandVKey(VirtualKeyCode vkey)
56
        OSInput.VirtualKeyCodes key;
58
            : base() {
-
 
59
                this.key = vkey;
-
 
60
 
57
 
-
 
58
        public CommandVKey(OSInput.VirtualKeyCodes vkey) : base() {
-
 
59
            this.key = vkey;
-
 
60
            osi = new OSInput(vkey);
61
        }
61
        }
62
 
62
 
63
        public override int Send() {
63
        public override int Send() {
64
            if (this.value == 1) {
64
            if (this.value == 1) {
65
                //Globals.SendKey.Keyboard.KeyPress(key);
-
 
66
                Globals.SendKey.Keyboard.KeyDown(key);
-
 
67
                Utils.delayms(10);
65
                this.osi.Send();
68
                Globals.SendKey.Keyboard.KeyUp(key);
-
 
69
                return 0;
66
                return 0;
70
            }
67
            }
71
            return 1;
68
            return 1;
72
        }
69
        }
73
 
70
 
Line 131... Line 128...
131
            return "Mouse:" + this.button + "=" + base.value + "\n";
128
            return "Mouse:" + this.button + "=" + base.value + "\n";
132
        }
129
        }
133
    }
130
    }
134
 
131
 
135
    public class CommandTrackIRKey : Command {
132
    public class CommandTrackIRKey : Command {
136
        VirtualKeyCode key;
133
        OSInput.VirtualKeyCodes key;
-
 
134
        OSInput osi;
137
 
135
 
138
        public CommandTrackIRKey(VirtualKeyCode vkey)
136
        public CommandTrackIRKey(OSInput.VirtualKeyCodes vkey) : base() {
139
            : base() {
-
 
140
            this.key = vkey;
137
            this.key = vkey;
141
 
-
 
-
 
138
            this.osi = new OSInput(vkey, true);
142
        }
139
        }
143
 
140
 
144
        public override int Send() {
141
        public override int Send() {
145
            if (this.value == 1) {
142
            if (this.value == 1) {
146
                Globals.SendKey.Keyboard.KeyDown(VirtualKeyCode.CONTROL);
-
 
147
                Utils.delayms(1);
143
                this.osi.Send();
148
                Globals.SendKey.Keyboard.KeyPress(key);
-
 
149
                Globals.SendKey.Keyboard.KeyUp(VirtualKeyCode.CONTROL);
-
 
150
                return 0;
144
                return 0;
151
            }
145
            }
152
            return 1;
146
            return 1;
153
        }
147
        }
154
 
148