Example #1
0
 public override string ToString()
 {
     if (triggeredBy == TriggerType.KeyDown || triggeredBy == TriggerType.KeyUp)
     {
         return
             ((((winRect == Rectangle.Empty) && !processName.Any()) ? "" : "*") +
              Macro.GetKeyString(vk, modifiers) + (triggeredBy == TriggerType.KeyDown ? "" : " " + triggeredBy.ToString().Replace("Key", "").ToLower()));
     }
     else
     {
         return
             ((((winRect == Rectangle.Empty) && !processName.Any()) ? "" : "*") +
              ((MouseButtons)vk).ToString() + " button" + (triggeredBy == TriggerType.MouseDown ? "" : " up"));
     }
 }
Example #2
0
        private void setKeyState(bool CTRL, bool ALT, bool SHIFT, int keyValue)
        {
            txtCTRL2.BackColor  = txtCTRL.BackColor = CTRL ? Color.Lime : SystemColors.Control;
            txtALT2.BackColor   = txtALT.BackColor = ALT ? Color.Lime : SystemColors.Control;
            txtSHIFT2.BackColor = txtSHIFT.BackColor = SHIFT ? Color.Lime : SystemColors.Control;

            _modifier = Macro.GetModifierKeys(SHIFT, ALT, CTRL);

            //txtKeyInt.Text = Macro.GetKeyString(_vk, ModifierKey.None);
            _vk = keyValue;
            string keystring = Macro.GetKeyString(_vk, _modifier);

            if (!chkOrigKey.Checked)
            {
                txtKeyInt.Text = txtKeyInt2.Text = keystring;
            }
            else
            {
                tmp = Macro.GetKeyString(_vk, _modifier);
            }


            _hasValue = true;
        }
Example #3
0
 public override string ToString()
 {
     return(Macro.GetKeyString(vk, modifiers) + (type == InputEventType.KeyPress ? "" :  " " + type.ToString().Replace("Key", "").ToLower()));
     //just display 'B press' as 'B', for example.
 }