That endless Insert/Overwrite problem (Lexikos?)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LM_
Posts: 26
Joined: 11 Mar 2019, 09:30

That endless Insert/Overwrite problem (Lexikos?)

Post by LM_ » 28 May 2023, 07:24

Hi,
I refer to this post, in particular, viewtopic.php?t=20899 , and to Lexikos' answer over there.

I make extensively use of my (keyboard-integrated) NumPad, but in its setting NON-NumPad, i.e. with "NumPad" disabled (ready for numbers to be available when I trigger the NumPad key, exceptionally), so I assign lots of functions to those "NumPad" keys, with the "NumPad" toggle being DIS-abled.

Then, it seems that Num-{ins} (vulgo: "Num-0"), especially (and even Num-{end} (vulgo: Num-1), but I'm not so sure here), often (but not invariably) reset my "Insert: YES" key (i.e. "Insert" vs. "Overwrite") to "Overwrite", which, again and again, seriously bothers me within my MAIN application - whilst I admit I don't even now if then, I will have reset the Insert-Overwrite "toggle"* to "Overwrite" even in other application, but presumably, it did?

(EDIT: Since INS is a toggle, too, just toggling INS would have desastrous effects whenever INS will have NOT been faultily-toggles, since there is (really?) NO system setting to get the current INS information from?)

(EDIT 2: I'm not sure if the "Ins" vs. "Overwrite" setting is really individual to each application, i.e. if the moment in time WHEN I press some Num-Ins, or Num-End key, determines for WHAT application that setting will then be changed, from always-default-INS to unwanted "overwrite" - very probably, that situation, i.e. the fact WHICH is the currently "active" application" when I use those keys, will have an incidence, too? And since, more or less, this setting is a "Windows" setting, after all: I'm on W10 - even the Windows version may have its play in this? INS vs. "Overwrite" NOT being a "real" toggle, in the end, obviously is a quite terrible design decision on MS's side, it seems?)

From your post I mentioned above, it appears that those "False-Num"-keys (i.e. Num-Ins, and/or even Num-End) are able to SWITCH the current = default {Num}-key setting, which should ALWAYS be Insert, NOT overwrite, BUT they might be able to switch that Insert-vs.-Overwrite setting even for JUST SOME applications, not for others (which seems to follow my observations, but I might be erroneous here).

Thus, I searched for some GLOBAL setting for "It's INSERT. period", and my idea was that with every assignment of {num-ins} and {num-end}, I would systematically trigger, even before the "real" key assignment, that "insert-key is insert, damn!" (reset) command, or, if needed, to ADD that "reset to INSERT, DAMN!!!!" command AFTER the "real" key assignment of Num-ins or Num-end...

But you said - if I understood you well - that "Ins-Overwrite" is NOT a real toggle, like the others are, and that every application (again: if I understood your post well) will process possible switches of that (not-even-a-rea)-toggle, according to their respective internal rules:

So, what to do, in AHK's key assignments, then, since, if I simply add (before or after the real assignment /code) a sendevent, {ins}, I obviously risk to switch the INS to OVERWRITE when in reality it has NOT yet been switched, switching it NOW to "overwrite", when in fact, all I had wanted was, it had remained (!) at its INS setting, the real, double, problem obviously being that
- ins vs. overwrite is not a real (i.e. system-wide) toggle but something totally chaotic, and
- it's not possible (?!), by any means, to "get" the current state of this (non-) toggle, by system means (some DLL?)?

Thus, what to do, except for telling the developer of your main application "to do his homework", when the real situation is so difficult that they might NOT know WHAT to do, in order to prevent that pressing the Num-{ins}, or even the Num-{end} (sic!) key will shift the(ir) INS setting from INS to "overwrite"?

This is a nightmare, it seems!

Please, Lexikos, as the ultimate authority to answer such a question: Could you provide any AHK solution, or then, just even some hints to those "faulty" applications' developers?

Thank you so very much in advance yet!

Return to “Ask for Help (v1)”