Keyboard layout changing unwantedly

Hi,

A French user has his keyboard layout set to "AZERTY" (French Keyboard), 
and his physical keyboard is the same.

Whenever he launches our program (or activates it) the keyboard changes 
to US QWERTY. This is very annoying as he has to change it each time 
back to french keyboard.

Any ideas of cause of problem and how to solve?

Developed in D7pro on WinXP.

(User is on Windows 7 x64)

Thank you,
Rael
0
Rael
8/25/2011 5:03:17 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

5 Replies
957 Views

Similar Articles

[PageSpeed] 20

> {quote:title=Rael Bauer wrote:}{quote}
> Hi,
> 
> A French user has his keyboard layout set to "AZERTY" (French Keyboard), 
> and his physical keyboard is the same.
> 
> Whenever he launches our program (or activates it) the keyboard changes 
> to US QWERTY. This is very annoying as he has to change it each time 
> back to french keyboard.
> 
> Any ideas of cause of problem and how to solve?
> 
> Developed in D7pro on WinXP.
> 
> (User is on Windows 7 x64)
> 
> Thank you,
> Rael

Assuming that you aren't doing anything to change the locale

Does it change system wide, or just for your app?
Does adding this at the top of your .dpr's source code (before application.initialize) help
{code}
  // Win7 fix for preinstalled Win7 system locales being american
  Windows.SetThreadLocale(LOCALE_USER_DEFAULT);
  SysUtils.GetFormatSettings;
{code}
Does it help if the user changes his locale to american, and then back to his own language and preferred settings?
0
karl
8/25/2011 7:47:44 PM
>
> Assuming that you aren't doing anything to change the locale

Nothing as far as I am aware...

>
> Does it change system wide, or just for your app?

The user says all other applications work fine, it is just my app that 
gives them this problem.

> Does adding this at the top of your .dpr's source code (before application.initialize) help
> {code}
>    // Win7 fix for preinstalled Win7 system locales being american
>    Windows.SetThreadLocale(LOCALE_USER_DEFAULT);
>    SysUtils.GetFormatSettings;
> {code}

I will try it out. Thanks for the tip.

> Does it help if the user changes his locale to american, and then back to his own language and preferred settings?

Will need to ask. The user did just tell me that if they remove the US 
keyboard then all works ok. (It was installed by default by Windows). 
But this is likely to be a stumbling block for other users, so it would 
be good to find a proper solution.

Thanks
Rael
0
Rael
8/25/2011 9:19:40 PM
> {quote:title=Rael Bauer wrote:}{quote}
> >
> > Assuming that you aren't doing anything to change the locale
> 
> Nothing as far as I am aware...
> 
> >
> > Does it change system wide, or just for your app?
> 
> The user says all other applications work fine, it is just my app that 
> gives them this problem.
> 
> > Does adding this at the top of your .dpr's source code (before application.initialize) help
> > {code}
> >    // Win7 fix for preinstalled Win7 system locales being american
> >    Windows.SetThreadLocale(LOCALE_USER_DEFAULT);
> >    SysUtils.GetFormatSettings;
> > {code}
> 
> I will try it out. Thanks for the tip.
> 
> > Does it help if the user changes his locale to american, and then back to his own language and preferred settings?
> 
> Will need to ask. The user did just tell me that if they remove the US 
> keyboard then all works ok. (It was installed by default by Windows). 
> But this is likely to be a stumbling block for other users, so it would 
> be good to find a proper solution.
> 
> Thanks
> Rael

There's been a lot of reports in the forum of delphi using the wrong locale settings for pc's using non-american locales and win7 (mainly they seem to be preinstalled os's)
It looks like the users locale is set to one thing, but the system locale to another
The 2 lines of code or the swapping locales seem to fix the problem, but the reports I've seen are mainly about incorrect date formats etc
Keyboards's also a locale setting, so those might help you out
0
karl
8/26/2011 6:06:33 AM
> Does it change system wide, or just for your app?
> Does adding this at the top of your .dpr's source code (before application.initialize) help
> {code}
>    // Win7 fix for preinstalled Win7 system locales being american
>    Windows.SetThreadLocale(LOCALE_USER_DEFAULT);
>    SysUtils.GetFormatSettings;
> {code}

Thanks this did help solve the problem.

A strange thing though, I sent the user a demo app (RxRichEdit Demo), 
one with this code, and another without this code, and he said that both 
worked fine. (Although my main app was still not working at that point).

-Rael
0
Rael
8/30/2011 8:38:57 PM
On 2011/08/30 10:38 PM, Rael Bauer wrote:
>> Does it change system wide, or just for your app?
>> Does adding this at the top of your .dpr's source code (before application.initialize) help
>> {code}
>>     // Win7 fix for preinstalled Win7 system locales being american
>>     Windows.SetThreadLocale(LOCALE_USER_DEFAULT);
>>     SysUtils.GetFormatSettings;
>> {code}
>
> Thanks this did help solve the problem.
>

I got a few replies from some french (keyboard) users saying that 
problem has been resolved for them.

Now however, I have just got a message from a german user saying that 
the keyboard no longer works properly (it is using English and not 
German) - whereas /before/ there was no problem (i.e. before I made the 
above changes.)

Any idea why this is happening?/How to resolve?

Thanks
Rael
0
Rael
11/17/2011 12:04:54 PM
Reply:

Similar Artilces:

delphi 2009 Keyboard layout changes to default when exiting dbgrid
Hi, i'm having the same problem as Georgi Georgiev in this [thread |https://forums.codegear.com/thread.jspa?messageID=284928&tstart=0]. When i use a dbgrid in a form then when the dbgrid lose focus then the keyboard languages changes from the greek language that the user is typing to the default(English). This is very annoying to the user as he has to change the language again and again when the dbgrid loses focus. As Georgi Georgiev stated in DBGrids.pas the code that causes this behaviour is procedure TCustomDBGrid.WMKillFocus(var Message: TMessage); begin ImeName := Screen.D...

Changing keyboard layout
I can't change the keyboard layout, when I add second layout in YaST. The switching key combinations doesn't work. When I add second layout in "Configure Desktop", I can change layouts but often I should first mouse click the flag icon in the tray, before keyboard combination begins to work. -- Linux novice ----- openSUSE 11.1 64 Bit, KDE 3.5.10, -ASUS M3A78-EMH HDMI, Athlon X2 4000+ 2.1 GHz 65nm, Ice Hammer 4400 B, Corsair XMS2 2x1Gb 800 MHz, Radeon HD 3200 Int, LG L2000C, Seagate 500 GB- --------------------------------------------------------------------...

Change Keyboard Layout in LXDE
Hello, I am using openSuSE 11.3 and LXDE. How can I switch between British-English layout and Greek layout in LXDE? Thanks alot. -- Leonardo12 ------------------------------------------------------------------------ Geia sou Leonardo, It's pretty straightforward. Login as root, and edit (with vim, gedit, whatever) the file /etc/xdg/lxsession/LXDE/autostart Add the following row to the file: @setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,gr Then, logout root and log off your LXDE session. The next time you log in, the left Alt-Shif...

How to Change Keyboard Layout Programmatically ?
  Hi There  I have a website with multiple languages on of them is arabic which is right to left .   I have many text boxes and i could manage to set the cursor on the right via css . The problem is i want the user to start writting in arabic directly without the need to change the writting language from keyboard. are there any way to simulate the left alt + shift click which is used to change to arabic or any code to change the direction of the cursor in the textboxes automatically in arabic page .   i have read many posts before but none of them is useful fo...

How we can change the keyboard layout ??
Dear AllIs there any way to change the keyboard layout when a TextBox on an ASPX page gets the focus?   Regards??   Hi, keyboard layout means? give some more details?VasanthakumarSoftware Engineer. Thanks for your repaly i mean if you have textbox1 and textbox2 when you focus the textbox1 the keyboard  language is EN (en-us) and when you focus the next textbox (textbox2) the keyboard  language change automatically to AR(ar-ae)....   thanks Hi, try this.... <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Defaul...

How can I change Keyboard Layout to German?
Hello, I installed SLES10SP3. When I login to the console the keyboard layout is US. This SLES runs in a VM under MS Virtual Server 2005. When I login to the Desktop I changed in Yast2 everything to de_DE.UTF-8 It took after a reboot. When I first login to the Desktop with init 5 the keyboard layout is german. When I change Runlevel with init 3 the keyboard layout is still german. When I reboot and login directly to the console the keyboard layout is US again. I want to CHANGE this. How come it doesn't work? All LC Variables other than those mentioned below show POSIX ...

Keyboard Layout Changes But JUST in Mozilla apps
Folks, (Sorry if I misposted this in any way). System - P4 2.8 GHz/2 GB RAM OS: XP Pro SP2 I was wondering if anyone has seen/has a clue about this weird problem I've been having... It started... years ago... I honestly don't remember what versions of the apps, but at least FF2 and Thunderbird 1.5. Basically, after a while of running (I leave both running pretty much from the start of my computer until I shut it down - roughly 2-4 months in between), FF and Thunderbird seem to automatically "switch" my keyboard layout and think I'm typing with wha...

Change keyboard layout and input language respectively
Hello! Is there any way to change the input language on asp.net sites??I have a mask to enter informations for members. This site is available in german and croatian. When the user changes the language to croation the input language of windows should also be changed! Is there any way to implement this? Thank you  That is covered in this long thread the original poster wants users to change between English and Irish, so read that thread then post more questions because you can change the language with drop down list and accept contents in both langauge.  Hope this helps....

Keyboard component in Delphi 2010
Is it possible to change more than just the backspace and enter captions on the numpad provided with D2010? If there is a way within the delphi libraries that would be fine too. I apologize if I didn't put this in the right category. Al Herman wrote: > Is it possible to change more than just the backspace and enter > captions on the numpad provided with D2010? If there is a way within > the delphi libraries that would be fine too. > > I apologize if I didn't put this in the right category. Well, since TTouchkeyboard is a component the vcl.components.usi...

Keyboard language changes to default when editing a DBgrid with Delphi XE2
Default input language in Windows is English US. If I change to another language (in my case Greek) and then try to edit a cell on a dbgrid it automatically changes to default (English) either just by positioning the mouse on the cell or after exiting the grid. Same happens if default is Greek, changing to English and then editing the Grid it changes back to Greek! I tried to workaround by changing the keyboard at runtime with LoadKeyboardLayout(klId, KLF_ACTIVATE) but with same results. Damien Styloglou wrote: > Default input language in Windows is English US. If I change to > ...

Extra keyboard layouts will be available in Settings > Keyboard > Built-in Keyboard soon
Hi all, The next Nightly build from m-c will offer the feature, turned on in bug 1029951, which will allow users to download dictionaries from our CDN and turn on the layouts previously not included in the builds. The builds will now include all layouts which does not require a dictionary or have a downloadable dictionary available. A few Asian IMEs and handwriting pad which must be shipped with their dictionaries are remain to be excluded. Emoji layout which is still being developed is also not shipped yet. >From time to time we have people contribute to Gaia, asking for in...

Extra keyboard layouts will be available in Settings > Keyboard > Built-in Keyboard soon
Hi all, The next Nightly build from m-c will offer the feature, turned on in bug 1029951, which will allow users to download dictionaries from our CDN and turn on the layouts previously not included in the builds. The builds will now include all layouts which does not require a dictionary or have a downloadable dictionary available. A few Asian IMEs and handwriting pad which must be shipped with their dictionaries are remain to be excluded. Emoji layout which is still being developed is also not shipped yet. >From time to time we have people contribute to Gaia, asking for in...

want to change from flow layout to grid layout
I am creating asp.net web applications using VS 2003 , I have webfrom1.aspx page and I have chage style to flow layout. But I want to change styel of that to Grid Layout. when I see property I dont see Grid layout/flow layout options. help me How do I change my layout , from flow layout to grid layout   thank you maxmax  add this to your body:<body ms_positioning="GridLayout"> Thanks,Karan~ Remember To Mark The Post(s) That Helped You As The ANSWER ~...

superreview requested: [Bug 354745] Show/hide events not fired for layout changes in a changelist : [Attachment 240527] Change where we check for significant changes to frames
Aaron Leventhal <aaronleventhal@moonset.net> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 354745: Show/hide events not fired for layout changes in a changelist https://bugzilla.mozilla.org/show_bug.cgi?id=354745 Attachment 240527: Change where we check for significant changes to frames https://bugzilla.mozilla.org/attachment.cgi?id=240527&action=edit ...

Web resources about - Keyboard layout changing unwantedly - embarcadero.delphi.general

Stalking - Wikipedia, the free encyclopedia
For the stalking of deer, see deer stalking . For visiting near Chernobyl, see Chernobyl stalking . Stalking is unwanted or obsessive attention ...

Add Keyboard Shortcuts In Firefox To Browse And Navigate Without A Mouse
Ever wanted to use custom shortcuts on Firefox to browse the web with keyboard? My keyboard Navigator is a Firefox extension that allows users ...

Dear Ann Romney: I Felt Forgotten
... what that should entail. And although you may judge, and although you may not think it right, ultimately, if someone else impregnates me unwantedly, ...

Gigantic jellyfish invade the Sea of Japan
Outbreaks of Nomura's jellyfish off the coast of Japan have caused trouble for local fishermen/ Copyright (c) 2003 Y. Taniguchi, Niu Fisheries ...

'The Time and What Must Be Done' 2013 Lecture Series, Part 16
[Editor’s note: The following article contains a distillation of the hour-long message delivered by the Honorable Minister Louis Farrakhan as ...

My week on Soylent: 'I was irritable, grumpy and a general pain in the arse' - Life and style - theguardian.com ...
Soylent's creator claims that the powder can replace food. But what is it like to live on it for a week? Adam Gabbatt found out

Mad Max: Fury Road (2015) - Plot Summary - IMDb
Mad Max: Fury Road (2015) on IMDb: An apocalyptic story set in the furthest reaches of our planet, in a stark desert landscape where humanity ...

Rob Lowe Injures Himself While Surfing, Posts a Shirtless Selfie to Tell Fans He's Okay!
... while surfing on Sunday (October 19), but the trip to the hospital didn’t seem to totally get him down! “The amount of blood that can unwantedly ...

Rob Lowe still sexy after surfing accident
The former "West Wing" received stitches after suffering a surfing accident on Sunday.

This Week In Quotes: Dec 3 – Dec 9
... that the group of Katie Courics, Contessa Brewers, Keith Olbermanns, et al. have never in their lives gotten unexpectedly and unwantedly pregnant. ...

resources last updated: 11/20/2015 6:33:04 PM