The insert key on the keyboard (ins) makes it possible to override text. Is it possible to activate that key so the insert key function is on when my application starts? I'm working in C# windows forms
I tried:
var key = Key.Insert; // Key to send
var target = Keyboard.FocusedElement; // Target element
var routedEvent = Keyboard.KeyDownEvent; // Event to send
target.RaiseEvent(
new KeyEventArgs(
Keyboard.PrimaryDevice,
PresentationSource.FromVisual(target),
0,
key)
{ RoutedEvent=routedEvent }
);
and it works only on the first selected masked textbox
System.Windows.Forms.SendKeys.Send("{INSERT}");