- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am migrating a Fortran application from OpenVMS to Windows using CVF. It is an editor for tabular numerical data and it has a keypad handling that works very much like the OpenVMS EDT editor. Some time ago I learned, thanks to Jugoslav, how to capture the NumLock key (via a hook).
My next problem is that the NumLock (GOLD on VT keyboards) has a significant use in the application in that it is often combined with another key on the keyboard, for example, if you hit GOLD+KP4 it will take you to the bottom of the file (and screen). And the problem is, of course, that when you hit NumLock it will change the state of the keypad to Non-Numlock or vice versa. When you happen to be in NumLock mode after hitting NumLock it is no problem to interpret GOLD+KP4 as bottom of file but in the other mode it seems impossible to distinguish the Left arrow key (KP4) on the keypad from the left arrow key outside the keypad (which I always WANT TO interpret as left arrow).
I have tried to analyze the scan codes for the two keys but they seem to be exactly the same.
Is there a way to distinguish between the two left arrows (as well as the other arrows, of course)?
One way to do it would obviously be to ALWAYS have the keypad in NumLock mode in the application (as soon as you hit NumLock you put the keypad into that mode). This seems to be the way that the Reflection VT emulators work, but not being a Windows programmer, I have no idea how to do this.
To use another key as GOLD would be almost impossible since people (including myself) are so used to this convention. Especially when the use the program in both environments.
I would be very grateful for any idea how to solve this!
Lars
My next problem is that the NumLock (GOLD on VT keyboards) has a significant use in the application in that it is often combined with another key on the keyboard, for example, if you hit GOLD+KP4 it will take you to the bottom of the file (and screen). And the problem is, of course, that when you hit NumLock it will change the state of the keypad to Non-Numlock or vice versa. When you happen to be in NumLock mode after hitting NumLock it is no problem to interpret GOLD+KP4 as bottom of file but in the other mode it seems impossible to distinguish the Left arrow key (KP4) on the keypad from the left arrow key outside the keypad (which I always WANT TO interpret as left arrow).
I have tried to analyze the scan codes for the two keys but they seem to be exactly the same.
Is there a way to distinguish between the two left arrows (as well as the other arrows, of course)?
One way to do it would obviously be to ALWAYS have the keypad in NumLock mode in the application (as soon as you hit NumLock you put the keypad into that mode). This seems to be the way that the Reflection VT emulators work, but not being a Windows programmer, I have no idea how to do this.
To use another key as GOLD would be almost impossible since people (including myself) are so used to this convention. Especially when the use the program in both environments.
I would be very grateful for any idea how to solve this!
Lars
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seethis KB articleas well as this one. They seem to be in collision though regarding Windows 9x -- the former says it cannot be done, while the latter says it can. I hope you don't need it for 9x.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again, Jugoslav, for your fast repsonse!
No I don't need Windows 9*, so it will be ok.
Lars
No I don't need Windows 9*, so it will be ok.
Lars

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page