Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird keyboard behaviour: switching language in VFP IDE

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,508
Scotland
I've occasionally noticed a very strange behaviour with my keyboard when working in the VFP development environment (VFP 9.0 SP1 under Windows XP).

This is a standard US English keyboard. In Control Panel's Regional and Language Options, the keyboard is set to English (US). I don't have the language bar enabled, and I haven't set up any hotkeys to switch language.

The keyboard always behaves exactly as you would expect. Except ...

Very occasionally (maybe once per month), when I'm working in VFP, it suddenly takes it into its head to switch to the UK layout. This has been happening for a year or so. More recently, it has decided to jump into the German layout. (Maybe next month, it will be in the mood for French; who knows?)

This only applies in VFP. If I switch to any other application, the keyboard works normally. When I switch back to VFP, the weirdness returns. If I quit and restart VFP, all is normal again.

I stress this is very intermittent. It usually happens after several hours of solid VFP work, but I can't think of anything specific that could be triggering it.

It's not really a big problem. I wouldn't want anyone to go to any trouble to help me fix it. But I am curious to know why it's happening, and whether anyone else out there has seen the same thing?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike,
from a USA based developer I can say I have never seen that issue. I wonder if with you based in Scotland the version of VFP is different for overseas reasons. Maybe a set order issue (Or what ever the setting is to set the alpha order different for different languages.)

Also have you tried a different keyboard? (I did see that it was a VFP only event.)

At least the 'fix' is easy, e.g. quiting and starting VFP again.

Lion Crest Software Services
Anthony L. Testi
President
 
Thanks for your reply, Anthony.

There is definitely no special Scottish version of VFP. Maybe there should be, but there isn't. (Perhaps I should volunteer to do a translation.)

In fact, all my settings - both Windows and VFP - are all-American (because that's where my clients and users are located.)

No, I haven't tried it with a different keyboard. As you rightly say, it's easier just to go out and in again.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
If you really want to take time to figure this out. How about creating a MS Virtual PC do only VFP development in it and see if it happens. If no then it is something outside of VFP, if yes then it is VFP and I am sure you can get MS to work on and send you a fix. <Evil Grin>

I do agree and it does sound like a pain, but maybe you will get lucky and someone else holds the answer.

To me it is like how every ~6 months or so VFP decides that it is not going to compile and take the changes that one just made to a PRG. Now that drives me crazy!

Lion Crest Software Services
Anthony L. Testi
President
 
I doubt this is vfp. You only see this happen there, as it's maybe the most often used program. It's simply ALT+SHIFT switching between keyboard layouts, and you can easily press that key combination unintended.

Bye, Olaf.
 
I'm with Olaf.

Back before Microsoft closed its newsgroups, this was a FAQ in the Word newsgroups.
 
Olaf and Dan,

I know about ALT + SHIFT, but there are two objections to that theory:

1. ALT + SHIFT cycles between installed keyboard layouts. It only has an effect if you have more than one layout installed. I only have US.

2. The use of ALT + SHIFT is not specific to any particular application. I only see the strange behaviour in VFP. I can switch to another application, and the keyboard returns to normal.

Thanks anyway for the suggestion.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Hi Mike,

I didn't realize you were running the EN-US version of Windows. Sorry.

USians wouldn't ever see this because we don't usually have any other keyboard layouts installed. Even if we TRY to switch keyboard layouts, there's nothing to switch to unless we've installed something extra.

I checked with a friend who is a Word MVP and she confirms that this is a frequent issue, but it's compounded in Word because any Word document can have its own language settings above and beyond the Windows mothership settings. And typical of Word, any document can have many different settings and users typically do not understand where -- or why, or how -- those settings are saved. <g>

Foxpro has none of that, of course.

Are you *sure* you don't have multiple keyboard layouts installed in Windows Control Panel->Language & Keyboard?
 
As the keyboard switches back to normal for you, when switching applications, that's a behaviour I have never seen. Although I often see keyboard layout switching and mainly in Foxpro and at times I'm pretty sure I didn't even come close to ALT for a while. But the task bar then is showing EN instead of german DE and so this is not limited to foxpro for me.

I will look out, if switching applications may switch the keyboard layout back to normal next time instead of manually switching back to DE. But I think, we have a different issue.

Bye, Olaf.
 
Dan,

Are you *sure* you don't have multiple keyboard layouts installed in Windows Control Panel->Language & Keyboard?

Yep. I just triple-checked for the third time.

Just to be sure we're talking about the same thing:

In Windows XP, I went to Control Panel / Regional and Language Options / Languages / Details / Settings. Under Installed Service, it says Keyboard : US. No other installed services. Nothing else unusual in Regional and Language Options. The Key Settings option is greyed out (presumably because it's not possible to activate a hotkey when is only one layout installed).

Your point about Word is interesting. Just about the only "British" thing I do on this computer is occasionally set the language of a particular Word document to British, for spell-checking purposes. But this is exceptional. Most of the time it is set to US.

In any case, that setting must surely be specific to the document, and can't affect FoxPro.

Olaf,

I've never had the language indicator showing on the taskbar. I'm reasonably sure I've never installed a UK keyboard layout on this computer, but even if I had, that wouldn't explain why I sometimes see a German layout.

Thank you both for your thoughts, which, as ever, are valuable. But I don't want to waste your time on this issue. I posted it more as a curiosity than a problem (but it would be nice to get to the bottom of it).

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Yes, Mike, it would be nice to get rid of it. But it's an annoyance I got used to and often enough I know it's me pressing ALT+SHIFT instead of the very useful ALT+CTRL+SHIFT.

Too thin fingers.

Bye, Olaf.
 
Mike,

This sort of "nice to get to the bottom of it" issue is the stuff that keeps us all awake nights. You have my full sympathies! :)
 
Well, just for fun, I just loaded Visual FoxPro fresh, put focus in the command window, and pressed Alt + Shift.

Nothing unusual happened. The keyboard continued to behave normally - as you would expect, given I only have one keyboard layout installed.

So, it couldn't be that, when the strange behaviour occurred, it was because I accidentally pressed Alt + Shift.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Dan,

This sort of "nice to get to the bottom of it" issue is the stuff that keeps us all awake nights.

Ah, how true. I seem to have an inexhaustible supply of such issues these days.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top