joe@dayton.UUCP (Joseph P. Larson) (05/01/89)
Okay. Another dumb question. I want my program to accept keyboard commands including arrow keys, keypad, and function keys. Thus, I have set "VANILLAKEYS" in my window's idcmpflag field. Then, when I GetMsg() and it's a vanillakey, I handle the character. Question 1: Is this the most efficient/reasonable way to get character input. Question 2: How come I'm not getting messages for arrow keys, about half the keypad, and function keys? Can I get these at all with vanillakeys? I tried rawkey instead, but I don't really want to wade through all that crap it sends me. Is this the only way? Question 3: What do I really need to know about internationalizing things? (Or should I just go read a recent Amy Transactor for more info on this last one?) It's rather frustrating that my VANILLAKEYS won't give me half the special keys on the keyboard. Is this simply a shortcoming in my keymap? -Joe -- Life is a cabaret (old chum). UUCP: rutgers!dayton!joe (Picts 1-13 are DHDSC - Joe Larson/MIS 1060 ATT : (612) 375-3537 now ready.) 700 on the Mall, Mpls, Mn. 55402
dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (05/02/89)
:Okay. Another dumb question. I want my program to accept keyboard
:commands including arrow keys, keypad, and function keys. Thus, I
:have set "VANILLAKEYS" in my window's idcmpflag field. Then, when
:I GetMsg() and it's a vanillakey, I handle the character.
:
:Question 1: Is this the most efficient/reasonable way to get character
:input.
Yes, but as you found out it has some major deficiencies.
:Question 2: How come I'm not getting messages for arrow keys, about
:half the keypad, and function keys? Can I get these at all with
:vanillakeys? I tried rawkey instead, but I don't really want to
:wade through all that crap it sends me. Is this the only way?
VANILLAKEYS was implemented badly. You only get events for
(as far as I can tell), single-printable-characters, and maybe not
even all of those.
:Question 3: What do I really need to know about internationalizing
:things? (Or should I just go read a recent Amy Transactor for more
:info on this last one?)
You need to use RAWKEYS and then DeadKeyConvert() to properly
handle the keyboard, plus be prepared to handle DeadKeyConvert()
returning strings larger than a character in length. DeadKeyConvert()
uses RawKeyConvert(). If you aren't familar with it, I suppose you
can send me email and I'll work up an example.
>-Joe
-Matt