473,651 Members | 2,518 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 = LoadKeyboardLay out("00010409", KLF_ACTIVATE | KLF_REORDER | KLF_REPLACELANG )
ActivateKeyboar dLayout(hkl,KLF _REORDER | KLF_SETFORPROCE SS | KLF_REPLACELANG )
DWORD ret = BSM_ALLCOMPONEN TS
BroadcastSystem Message(BSF_POS TMESSAGE,&ret,W M_INPUTLANGCHAN GEREQUEST,INPUT LANGCHANGE_SYSC HARSET,(LPARAM) 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 1285

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

Similar topics

7
10634
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 were a keyboard. I need to be able to identify input from the scanner and keyboard independently. I've looked at DirectX.DirectInput, and using user32.dll to hook into the keyboard messages, but neither method seems to allow for identification of...
0
1768
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 to keep toggling the keyboard input language bar settings manually from the keyboard whenever I wish to switch languages - this is a real pain. What I would like is for the keyboard language to be changed automatically to the appropriate...
3
2010
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 restarting the IDE? Thanks, Mark
5
7496
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 program still run? I did some research online, and yeah, some guy said, just use the fflush(stdin); But, it kills everything in the keyboard buffer(excuse me if my understanding is wrong), which is not what I want.
9
10968
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 as I intend while the program has focus, but when the application loses focus, the listening stops. I am using VS 2008 beta 2, with .net 3.5.
1
3078
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 confused when set to Engish (United Kingdom). Basically parts of words spelt correctly get underlined, it is though it has got confused over where words begin and end. I have tried un-installing and reinstalling .NET. And tested on 5
12
4278
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 keyup, and only the keyup one is fired two times. The first with a 0 keycode and the characte code just later. No keydown or keypress events, and it is not enough information to know what character was really pressed. It happens with Firefox ...
3
2997
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, this function returns true(non-0), but does not read the character. If no keystroke is pending, kbhit() returns false (0)." Here is the test code,
8
5293
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 has the focus and handle ctrl-c, ctrl-v, or any other shortcuts. I have the same shortcuts working in my app, but have not determined how to find out which control has focus. Would I set up a loop or code for each control at form level. Any help...
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8695
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7296
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
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 we have to send another system
2
1585
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.