473,503 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keyboard Input Language

Just wondering whether anyone has an idea as how to set the default keyboard layout for the system in realtime. The following code I have does it for all ACTIVE processes. (New ones still use the old keyboard layout). This particular example changes the normal layout to dvorak.

HKL hkl = LoadKeyboardLayout("00010409",KLF_ACTIVATE | KLF_REORDER | KLF_REPLACELANG)
ActivateKeyboardLayout(hkl,KLF_REORDER | KLF_SETFORPROCESS | KLF_REPLACELANG)
DWORD ret = BSM_ALLCOMPONENTS
BroadcastSystemMessage(BSF_POSTMESSAGE,&ret,WM_INP UTLANGCHANGEREQUEST,INPUTLANGCHANGE_SYSCHARSET,(LP ARAM) hkl)

I know this can be done because going to Control Panel -> Regional and Language Options -> Languages -> Details and chosing the language does exactly what I want. I can't seem to find the API Microsoft is using.

Any help is appreciated. I've investigating with Dependancy Walker and MS Spy, but to no avail.
Nov 17 '05 #1
0 1271

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
10597
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
0
1760
by: Freddy | last post by:
In my Access db (which I have created to help me learn Greek) I am using text box controls on a form. Some of these controls require English input and some require Greek input. Currently I have...
3
2002
by: nhmark64 | last post by:
Hi, Sometimes when I am cutting and pasting it looks like the keyboard layout changes; for instance ',' and 'w' are interchanged. Is there a better way to fix this problem than exiting then...
5
7479
by: mattmao | last post by:
Hello everyone, I am studying the programming language C from the scratches, so my question might be too simple for you guys: How would you clear your previous keyboard strokes while let the...
9
10956
by: Kbalz | last post by:
I have an application that minimizes itself, and I want it to listen for certain key commands, and when they are pressed, my program can react to them. So far I've gotten my application to react...
1
3072
by: H-S | last post by:
Help! I am trying to use the Windows.Controls.TextBox with spellcheck turned on. It works fine if my keyboard input language is set to English (United States). But the spellcheck starts to get...
12
4238
by: =?ISO-8859-1?Q?Joaqu=EDn_Zuazo?= | last post by:
I'm trying to find what character was pressed, using an accent with a dead letter, e.g an á, on an input box. I have made an small program to check the keyboard events keydown, keypress and...
3
2985
by: NaN | last post by:
I've been trying to use _kbhit() but it didn't do what I thought it would from books, "Detects whether a keypress is available for reading." Herbert Schildt says, "If the user has pressed a key,...
8
5283
by: BD | last post by:
How can I duplicate the behavior of the operating system shortcut keys in my application? For example, my windows form has 5 controls (textboxes), the operating system will pickup which control...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.