Re: Keyboard Input (Win32Lib Question)
- Posted by Brian Broker <bkb at CNW.COM> Dec 12, 1999
- 485 views
On Sun, 12 Dec 1999 18:05:46 -0600, Brent Hugh <bhugh at CSTP.UMKC.EDU> wrote: >Hi all, > >I'm getting keyboard input using Win32lib (I'm still using version 0.20d if >it makes a difference). You might want to take the time to download the latest version from the recent user contributions page. It's much more feature rich with html documentation. The documentation still needs some work but that's something I'll need to take up with David. >What I am interested in for the purpose of the program I am working on, is >the *position* of the keys, as opposed to their actual letter or number >value. What I am doing is making a virtual "piano keyboard", so, for >instance, I am making the computer keyboard's "qwertyui" = "abcdefgabc" on >the piano keyboard. You will want to use onKeyDown instead of onKeyPress since onKeyDown will return a scan code instead of a key code (which, as you noted, can change depending on your OS language). Scan codes will return the same value regardless of what the key represents. With a 'piano' type application, you might also find onKeyUp to be rather useful (also returns a scan code). -- Brian