Answer the question
In order to leave comments, you need to log in
C++ changing keyboard layout in console application?
something like PuntoSwitcher, at the input a string of English characters at the output a string of Russians located on the same keys.
Example
input:
qwerty
result:
ytsuken
If I understand correctly, this can be somehow implemented through an ASCII table. But I still don't understand how. Many thanks in advance for your advice and replies.
Answer the question
In order to leave comments, you need to log in
No, you misunderstand. ASCII has nothing to do with keyboard layout.
The easiest way is to have a matching dictionary. The key is an English character, the value is Russian. Well, then it's a matter of technology and the cycle ...
PS if you tried to google as in the title of the question, then this will not work. Neither the keyboard layout nor the console application has anything to do with it.
I understand correctly that I need a cycle that will iterate over the string and the switch statement nested in it, which in turn will look for a match among the letters and, if it matches, display the corresponding English one?
that is, something like this should turn out:
char str[];
while (int i =0; str[i] <> '/0')
{
swith (str[i])
{
case 'q':
str[i] = 'th';
break;
case 'w':
str[i]= 'w';
break;
...............................................................
_ .........................
i++;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question