private void SendHotkeyPressedNow(HotkeyIDs hotkey, bool released)
 {
     if (!Initialized)
     {
         return;
     }
     byte[] hotkeyBytes = new byte[] { (byte)hotkey, Convert.ToByte(released) };
     WriteMessageGuaranteed(new Message(MessageIDs.SendHotkeyPressed, hotkeyBytes));
 }
예제 #2
0
 private void SendHotkeyPressedNow(HotkeyIDs hotkey)
 {
     if (!Initialized)
     {
         return;
     }
     byte[] hotkeyByte = new byte[] { (byte)hotkey };
     WriteMessageGuaranteed(new Message(MessageIDs.SendHotkeyPressed, hotkeyByte));
 }
        private void ProcessHotkeyPressed(byte[] data)
        {
            HotkeyIDs hotkey   = (HotkeyIDs)data[0];
            bool      released = Convert.ToBoolean(data[1]);

            if (released)
            {
                Log($"{hotkey.ToString()} released");
            }
            else
            {
                Log($"{hotkey.ToString()} pressed");
            }

            Hotkeys.hotkeys[data[0]].overridePressed = !released;
        }
 public void SendHotkeyPressed(HotkeyIDs hotkey, bool released = false) => pendingWrite = () => SendHotkeyPressedNow(hotkey, released);
예제 #5
0
 public void SendHotkeyPressed(HotkeyIDs hotkey)
 {
     pendingWrite = () => SendHotkeyPressedNow(hotkey);
 }
 public void SendHotkeyPressed(HotkeyIDs hotkey)
 {
     byte[] hotkeyByte = new byte[] { (byte)hotkey };
     WriteMessageGuaranteed(new Message(MessageIDs.SendHotkeyPressed, hotkeyByte));
 }