Insert / Overtype mode
-
RobertRioja
- User

- Posts: 88
- Joined: Thu May 02, 2019 3:57 am
- Location: USA
- Contact:
Insert / Overtype mode
Is there a way to control the Insert / Overtype mode of the keyboard programmatically?
Re: Insert / Overtype mode
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.
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
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
-
RobertRioja
- User

- Posts: 88
- Joined: Thu May 02, 2019 3:57 am
- Location: USA
- Contact:
Re: Insert / Overtype mode
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.
Thanks for trying anyway.
Re: Insert / Overtype mode
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))