public void OnControl(object s, CharacterEventArgs args) { switch (args.Character) { case ControlCharacters.CtrlV: string c = KeyboardEventDispatcher.GetNewClipboard(); Insert(c); return; case ControlCharacters.CtrlC: if (text.Length > 0) { KeyboardEventDispatcher.SetToClipboard(Text); } return; } }
public static void EventInput_CharEntered(object sender, char c, int lParam) { CharacterEventArgs e = new CharacterEventArgs(c, lParam); if (char.IsControl(e.Character)) { if (ReceiveCommand != null) { ReceiveCommand(sender, e); } } else { if (ReceiveChar != null) { ReceiveChar(sender, e); } } }
public void OnChar(object s, CharacterEventArgs args) { Insert(args.Character); }