Page 1 of 1

Insert / Overtype mode

Posted: Sat Nov 29, 2025 11:55 pm
by RobertRioja
Is there a way to control the Insert / Overtype mode of the keyboard programmatically?

Re: Insert / Overtype mode

Posted: Mon Dec 01, 2025 11:23 am
by Axolotl
This mode information is probably not stored/configurable in the keyboard.
I looked for an explanation in the Scintilla documentation, as there is a section on overriding.
To my knowledge, the mode is stored in the text control.
OverType (borrowed from Scintiall Doc)
SCI_SETOVERTYPE(bool overType)
SCI_GETOVERTYPE → bool

Re: Insert / Overtype mode

Posted: Sat Dec 06, 2025 11:18 pm
by RobertRioja
I also cannot find any way to control the Insert / Overwrite modes. It seems strange that something like this cannot be controlled by software. I guess if anyone figures it out, they could become rich !!!
Thanks for trying anyway.

Re: Insert / Overtype mode

Posted: Mon Dec 08, 2025 11:55 am
by interfind
This is working for me:

Code: Select all

;Send Insert-Key to Notepad
#INPUT_KEYBOARD         = 1
#KEYEVENTF_KEYUP        = $0002
#KEYEVENTF_SCANCODE     = $0008
#SC_INSERT              = $52   ; Hardware-Scancode

Define input.INPUT

;Send Insert-Key DOWN
input\type = #INPUT_KEYBOARD
input\ki\wVk = 0
input\ki\wScan = #SC_INSERT
input\ki\dwFlags = #KEYEVENTF_SCANCODE

mywnd = FindWindow_("Notepad", NULL)
If mywnd=0
  RunProgram("notepad.exe")
  Delay(500)
  mywnd = FindWindow_("Notepad", NULL)
EndIf

If mywnd
  SetForegroundWindow_(mywnd)
  ;ShowWindow_(mywnd, #SW_SHOW)  
EndIf

SendInput_(1, @input, SizeOf(INPUT))

;Send Insert-Key UP
input\ki\dwFlags = #KEYEVENTF_SCANCODE | #KEYEVENTF_KEYUP
SendInput_(1, @input, SizeOf(INPUT))