Search All Forums
Dart Home | PowerTCP Emulation for .NET | Custom Development Reply | PowerTCP Emulation for .NET Topics | Forums   
AuthorForum: PowerTCP Emulation for .NET
Topic: Numlock Key toggles but shouldn't

From: USA
Posts: 5
Member Since: 11/13/13
posted November 13, 2013 2:00 PM

The server accepts PF1 (Numlock) to spawn a subprocess. The default mapping works and sends the proper <Esc>OP, but it toggles the Numlock (off/on) or (on/off). I've played around with trying to set it back, but want to stay away from using the Windows API if possible. Is this a known issue? Intended functionality? Is there a non-WinAPI workaround?

Nick B (Admin)

From: Utica, NY USA
Posts: 595
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 13, 2013 4:55 PM

Hello Danny,

If I understand, your issue is that the Numlock key toggles on and off when pressing it while using the VT control? As it is designed for use within windows applications and not an exclusive VT terminal, the VT control is not designed to change the standard expected functionality of the user's keyboard. Changing the activation behavior of the numlock key is beyond the scope of the control, so I'm afraid I don't have any alternative workaround to provide for that, though you may consider keymapping some other key to send <Esc>OP in the KeyDown event.

From: USA
Posts: 5
Member Since: 11/13/13
posted November 13, 2013 5:06 PM


Thanks for the reply, I was afraid you were going to say that. Unfortunately my task is to simulate as closely as possible the outdated emulator that we're currently using (while creating some enhancements). The NumLock key really has to be what sends the PF1 sequence.

I did break down and use the Windows API to re-lock the NumLock each time a PF1 spawns that subprocess I mentioned. This only works because our Numlock should be on for the entirety of the session.

For anyone else with a similar issue, I couldn't trap the Numlock changes in the KeyDown or KeyPress event. Although the light goes out immediately on the KeyDown event, the value isn't updated until the event exits the routine. I instead had to test for the expected data (in Telnet1_Data) after the server responded to the PF1 escape sequence.

Thanks again for looking at it Nick,
Reply | PowerTCP Emulation for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX