Hello everybody
I am having problems parsing unique keys in my program (for example greek letters or cyrillic letters). I am currently using IDCMP_VANILLAKEY to trap input from user, but either I am not parsing the output correctly, or else I need to do something else to get the correct character.
I would be very grateful, if any could point me to the correct path. If I should be so lucky that someone even had a code example, I would be almost ecstatic (C or C++).
Thanks you
Input of unique characters
Re: Input of unique characters
IDCMP_VANILLAKEY is useless for all but the simplest of cases. Try IDCMP_RAWKEY.
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 10:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: Input of unique characters
Don't know if it what you' re looking for, but here is and example http://jabirulo.site90.com/temp/TestRawKey.c (not made by me)desler wrote:Hello everybody
I am having problems parsing unique keys in my program (for example greek letters or cyrillic letters). I am currently using IDCMP_VANILLAKEY to trap input from user, but either I am not parsing the output correctly, or else I need to do something else to get the correct character.
I would be very grateful, if any could point me to the correct path. If I should be so lucky that someone even had a code example, I would be almost ecstatic (C or C++).
Thanks you
Or are you using ReAction objects/classes?
Re: Input of unique characters
@Jaiverdir
Thanks for the example. I definitely think this is the way to go. However, I am getting a guru the first time I call RawKeyConvert and then garbage from the char container. I know that I most likely am doing something wrong, but I just want to make sure that I don't have to take any special precautions when using C++ instead of C. Also are there any other cases anyone can think of that can cause the guru?
Thanks for the example. I definitely think this is the way to go. However, I am getting a guru the first time I call RawKeyConvert and then garbage from the char container. I know that I most likely am doing something wrong, but I just want to make sure that I don't have to take any special precautions when using C++ instead of C. Also are there any other cases anyone can think of that can cause the guru?
Re: Input of unique characters
Don't use RawKeyConvert - use MapRawKey().desler wrote:@Jaiverdir
Thanks for the example. I definitely think this is the way to go. However, I am getting a guru the first time I call RawKeyConvert and then garbage from the char container. I know that I most likely am doing something wrong, but I just want to make sure that I don't have to take any special precautions when using C++ instead of C. Also are there any other cases anyone can think of that can cause the guru?
I didn't know there was a RawKeyconvert, but it looks like it's part of console.device, so you would need to open that device and the interface. Anyway, use MapRawKey, the parameters are the same.