Help with non-english keyboards

  • Thread starter Tusike
  • Start date
In summary, the programmer is looking for a program that will print out the key that is pressed on the screen.
  • #1
Tusike
139
0
Hi! I have a program I want to share with my friends, but they have hungarian computers, and I'm unable to detect some of the key presses. Can anyone provide a sample C++ or FreeBasic program that does the following:

1)Waits for me to press a key I see on my keyboard
2)Prints that key on my screen.
3)Returns to part 1), and does so until ESC is pressed.

That is all I'm asking. Even just showing me how to start would be great, although I'm not real good in C++. It's been driving me mad for a few hours now. I'm just unable to detect letters such as Á, Í, Ó, Ű, etc... Actually some of them do work using scan codes, but using what I have, the key for Í doesn't return any scan code. And some of the scan codes are different (e.g. for Ö it's 11 on my english keyboard, using alt-shift to change it to hungarian; and on a real hungarian keyboard it's 41). All I want is to see the key I pressed on my keyboard appear on the screen. Why is this so difficult? Even this forum can do it!

Sorry for the tone it's just that this is supposed to be fairly simple, and I've been trying for hours now.

Thanks for any help,
-Tusike
 
Technology news on Phys.org
  • #2
Hi there. Now I'm not a C++ programmer or a FreeBasic programmer but I hope I can give you some insight on how to do this (if I understood it correctly, that is). Have you ever tried to http://windows.microsoft.com/en-US/windows-vista/Change-the-system-locale" The link I posted here gives you some information on what changing the locale does.

"The system locale determines the default character set (letters, symbols, and numbers) and font that you use to enter information and that are used to display information in programs that do not use Unicode."*

Hope I helped you a little.

*From the link that I gave to you
 
Last edited by a moderator:
  • #3
I'm not sure that's what I'm looking for, I'll check it out tomorrow though. See my friends probably won't go through a lot of trouble to make sure my program works for them, they don't care that much:) When a key is pressed, the keyboard is supposed to return some sort of value that describes which key has been pressed; what I'm looking for is how Mozilla, Microsoft Word, and pretty much every program that is a bit advanced interpret the keyboard. E.g. in M$ Word, no one ever has a problem with the keyboard.
 
  • #4
Okay, sorry for the misunderstanding. But if you change your locale, don't you think that the scan codes will also change as well? I'm new to this kind of thing, but I was only trying to help out :D.

EDIT: When I say change your locale, I mean through your program, not necessarily through the control panel etc.
 
  • #5
You are probably right about that, and I'll test it out tomorrow when it's not 10 PM; but you see I don't want to have the readme file to the program say "Note: in order for this to work correctly, every time you wish to use this program change your locale to English (United States) & restart your computer".

Of course what may work is for me to create two sets of ways the keyboard is interpreted; one for that and one for a hungarian locale. I must see if this works, thanks for the suggestion!
 
  • #6
Well I hope that your program works! I'm not experienced in this field so don't expect me to be too much help XD.
 

Related to Help with non-english keyboards

1. How do I change the language on my keyboard?

To change the language on your keyboard, you can go to the settings of your computer or device and select the desired language from the list of available options. You may also need to install the language pack if it is not already installed on your device.

2. Why are the keys on my non-english keyboard in a different layout?

Non-english keyboards may have a different layout than the standard QWERTY layout. This is because different languages have different characters and symbols that are used more frequently. The layout of a non-english keyboard is designed to make typing in that specific language more efficient.

3. How do I type special characters on a non-english keyboard?

To type special characters on a non-english keyboard, you can use the Alt key in combination with a number code or a combination of keys. You can find a list of these codes and combinations online or in the keyboard settings of your device.

4. Can I switch back and forth between languages on a non-english keyboard?

Yes, you can switch between languages on a non-english keyboard. Most keyboards have a designated key or combination of keys that allow you to switch between languages. Alternatively, you can also change the language settings on your device to allow for easy switching.

5. How do I troubleshoot issues with my non-english keyboard?

If you are having problems with your non-english keyboard, you can try restarting your device or checking for any updates or software issues. You can also check the language settings and keyboard settings to ensure everything is properly set up. If the issue persists, you may need to contact technical support for further assistance.

Similar threads

  • Programming and Computer Science
Replies
24
Views
1K
  • Programming and Computer Science
Replies
11
Views
2K
  • Art, Music, History, and Linguistics
Replies
12
Views
2K
Replies
3
Views
2K
  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
2
Views
642
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
34
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
Back
Top