On 3/22/2023 10:27 PM, Michael wrote:
I have an openvpn configuration directory containing a few config files. 100.1.2.1.ovpn
100.1.2.2.ovpn
100.1.2.3.ovpn
When I doubleclick on that 100.1.2.3.ovpn text file, I get connected to the specified VPN server (here exemplified by 100.1.2.3) which works real nice.
Doubleclicking runs the openvpn client due to Windows file associations.
The resulting command window description says something like this
(look at the F4 entry).
  [C:\openvpn\config\100.1.2.3.ovpn OpenVPN 2.5.8 F4:EXIT F1:USR1 F3:HUP]
All that works real nice.
But if I exit that VPN session any other way than to hit the F4 keyboard
key, it sometimes (but not always) hangs up and gets stuck in a sad state.
What's the magic of the F4 Windows keyboard key?
The reason I care is it's hard to find that F4 key sometimes and I'd rather find an alternative way of killing the openvpn session without having to
hunt and peck for the specific F4 key (which is harder to hit on laptops).
Keyboards mechanically, don't have a particular bias.
Most of the keys are in a matrix. 7x17 perhaps. 24 wires.
One direction are senders. The other direction are receivers.
That's enough for 119 keys.
In addition, the modifier keys are "private" and each gets
its own signal. It is not on the matrix. Ctrl, alt, shift,
might get separate wires. (These are things I learned when
I built my own keyboard, in the 80's.)
When a matrix contact is closed, the keyboard waits three
scan cycles, before declaring "he really did press the key".
This is the debounce interval, that takes the springy bounce
in the electrical contacts into account.
If the matrix pair is depressed for too long, it can cause
the auto-repeat sequence.
*******
Windows, uses alt-F4.
If you click within a program window, and press alt-F4,
that causes an exit from the program.
If you click on the desktop surface, and press alt-F4,
the shutdown menu is presented. This is real handy, when
a Windows "improvement", causes the shutdown controls
in some menu to fail to show up. The alt-F4 method
always seems to work.
Thus, we can conclude from this, that the program developer
sees that Windows does that with alt-F4, so the developer
decides that a "naked F4" will be the exit key.
That is the only significance. Imitation.
The F4 key can have other functions bound to it,
like on a laptop you may find additional control symbols
bound to the keys.
    Paul
    Paul
--- MBSE BBS v1.0.8 (Linux-x86_64)
 * Origin: A noiseless patient Spider (3:633/280.2@fidonet)