- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a group of programs written in DOS F77 that allowed the user to respond to various prompts, menus, etc. using a variety of keys, including F1 - F10. These programs must be upgraded. Trapping the extended key scan codes for the function keys is easy, so in general this is no problem, But, the F10 key is special. My program sees F10 and continues accordingly, but Windows also traps it and attempts to open the File object on the window's menu. Then, further input of keys is blocked until the user completes the menu action--something which of course he doesn't want to do.
A simple <escape> keypress would close the menu and allow the program to continue. But the client WANTS to use the F10 key and he doesn't WANT to follow with <esc> every time. I thought it should be easy to have my program simulate the <esc> keypress, but I can't get anything to work. I have tried using functions like:
I4 = SYSTEM (CHAR(27))
I4 = SYSTEMQQ (CHAR(27)
These work sometimes, but not consistently. Then I tried
I4 = SYSTEM (SendEscape.vbs) where SendEscape.wsh is a singel-line script file "wsecho chr(27)".
This seems to work, but unfortunately the screen flashes briefly while the script runs. Would be nice to turn this off, but I don't know how.
Any ideas?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
F10 and similar keys can be trapped by inserting a hook process; I have posted sample code for this before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Do you upgrade your programs to console or windowed applications?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure what the relevancy of your inquiry is, but for what it's worth I am upgrading old F77 programs to Quickwin applications. I think the issue with the F10 key is independent of the type. If it's not I would like to know some details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tested the passdirkeysqq function http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/fortran/win/lref_for/source_files/rfpassd.htm#rfpassd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tested the passdirkeysqq function ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I am using passdirkeysqq. Does F10 trapping work for you?
Also: the shift-tab key does not work--it is intercepted by Windows, just like F10. It turns out that not being able to program a response to shift-tab causes even more grief than F10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I uesed Quickwin long time ago and I don't remember if I had problems with f10 key. With a classic windowed application, I intercept the WM_SYSCOMMAND message with wparam=SC_KEYMENU and lparam=0 to intercept f10 key.

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