Article View: comp.os.os2.programmer.misc
Article #227Arrow Key Problem w/Custom Keyboard Controller
From: Keith R. Bennett
Date: Mon, 25 Apr 1994 18:57
Date: Mon, 25 Apr 1994 18:57
50 lines
3092 bytes
3092 bytes
This message is about a problem we're having with a custom-made keyboard controller under OS/2. We're using a special kind of input device (a control wheel, or knob). It's connected to a keyboard controller based on a Motorola USAR SC405367FN chip. This custom made controller translates moves and presses of the wheel into key codes that are presumably compatible with the usual PC AT compatible keyboard. Turns of the wheel are translated into arrow keys. The problem is this: in PM applications, the arrow key messages don't function properly. I wrote a test program to see what my ClientWndProc was receiving. I wrote to a file all the info coming in with the WM_CHAR message. Both the custom and the standard controller were tested. When comparing them, the *only* difference was that: 1) the KC_VIRTUALKEY flag was not set with the custom controller 2) (Perhaps as a result of the above,) the virtual key code was zero. The scan codes were correct with both controllers. The problem occurs *only* in PM apps, not in full screen apps. Also, when tested with a standard keyboard and controller, this problem did not occur. I looked up the BIOS function calls for the keyboard, and there is no such information as a virtual key flag. (I know that OS/2 doesn't use the BIOS, but I wanted to see what information it provided.) How does OS/2 know its value? Does it infer from the scan code whether or not it's a virtual key? Can anyone tell me what's happening here? Does PM infer from the scan code whether or not it's a virtual key? Or is it the reverse, does it decide to find the virtual key code because the virtual key flag is set? Is there any information coming from the keyboard controller other than the scan code and shift states? Thanks for any help. If you have information that may help, please feel free to call collect (from continental US or Canada), at (703) 941-5952. - Keith -- -------------------------------------------------------------------------- Keith Bennett Bennett Business Solutions, Inc. C++/C Software Development 1605 Ingram Terrace kbennett@access.digex.net Silver Spring, MD USA 20906-5932
Technical Details
Message-ID:
<2ph3r3$q0k@access1.digex.net>Path:
arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!dearn!blekul11!idefix.CS.kuleuven.ac.be!ub4b!EU.net!howland.reston.ans.net! europa.eng.gtefsd.com!MathWorks.Com!panix!news.intercon.com!news1.digex.net!digex.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cd94,2fdeaaca2f85e138,start X-Google-Attributes: gid10cd94,public X-Google-Thread: 11307a,2fdeaaca2f85e138,start X-Google-Attributes: gid11307a,public X-Google-ArrivalTime: 1994-04-25 22:03:20 PST Path: arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!dearn!blekul11!idefix.CS.kuleuven.ac.be!ub4b!EU.net!howland.reston.ans.net! europa.eng.gtefsd.com!MathWorks.Com!panix!news.intercon.com!news1.digex.net!digex.net!not-for-mail From: kbennett@access1.digex.net (Keith R. Bennett) Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l Subject: Arrow Key Problem w/Custom Keyboard Controller Date: 25 Apr 1994 14:57:39 -0400 Organization: Express Access Online Communications USA: 800-969-9090 Lines: 50 Message-ID: <2ph3r3$q0k@access1.digex.net> NNTP-Posting-Host: access1.digex.net