How to stop OS X from switching input method (keyboard layout) automatically?

17

3

After using the wireless keyboard that comes with the iMac, I have switched to a MS Ergo Natural 4000 one. Surprisingly I had to install extra software as OS X could not work out which keyboard I had.

After which I went into sys prefs and set the main input method to be "British - Microsoft" first and "Swiss German" second (what the wireless keyboard is), on the "input sources" tab:

enter image description here

However... OS X keeps resetting my input method back to Swiss German which is driving me bananas.

I have the flag thingy top right so I can see when this changes.

N.B. I have "input source options" set to "use the same one in all documents" which I am assuming means keep the language the same for anything running.

It also flips back on the login page.

Does anyone know how to fix this?

adolf garlic

Posted 2010-01-22T09:23:14.130

Reputation: 1 618

Have also just noticed that for some applications, it is not even possible to select "British - Microsoft" e.g. Preview, QuickTimeplayer. Other applications like firefox and itunes work fine (although they do still keep switching back to swiss german) – adolf garlic – 2010-01-22T09:31:22.257

Answers

-1

The MS layout for the keyboard on OSX sucks

Use this layout instead http://liyang.hu/osx-british.xhtml

Seems to work

adolf garlic

Posted 2010-01-22T09:23:14.130

Reputation: 1 618

11

If the system is switching language without you asking to do so, it means that the current input source somehow becomes unavailable. This can happen if you are using a custom input source (put under ~/Library/Keyboard Layouts) and then lock your screen. The lock screen is owned by the system and thus does not have access to your custom layouts, only the system-wide ones. The current source being unavailable, it will automatically revert to another one.

To resolve this issue, ensure that your custom keyboard layout is put under /Library and not /Users/You/Libary. After moving the file, remove the input source from the list, reboot and then put it back again.

Brunni

Posted 2010-01-22T09:23:14.130

Reputation: 111

Thanks this worked great. This has been such a huge annoyance! It always happened when a Authorize prompt opened up and after log out. – jmagnusson – 2014-12-31T11:03:57.813

This works, thank you very much for this! Put the .layout file to "/Library/Keyboard Layouts" and then do a full OS reboot. – György Balássy – 2019-02-21T09:20:17.060

Thank you so much! This should be the accepted answer for sure. – ruohola – 2019-03-04T17:22:06.457

Thanks for this! I had my layouts in ~/Library and my app-store-installed apps couldn't see them and I had no idea why. – Daniel J. Pritchett – 2013-11-12T17:46:11.047

11

One possibility that I had in a similar case is that you are hitting the keyboard shortcut to switch input sources.

In Snow Leopard preferences, the default to select the previous input source is Command-Space. In your screen capture of the Language & Text preferences you can see that this shortcut is active (the other shortcut, to select the next input source, is inactive in that screen capture):

Input source shortcut

It's a bit odd that Command-Space is used, as that is also used for Spotlight. But if a shortcut is assigned multiple times, then Snow Leopard would show a warning, which your screen capture does not show. So, Command-Space won't activate Spotlight on your Mac:

Input source shortcut with warning

From Apple support: Command-Space: Show or hide the Spotlight search field (if multiple languages are installed, may rotate through enabled script systems)

user151019

Posted 2010-01-22T09:23:14.130

Reputation: 5 312

My 10.6 has a disabled (default) of Command-Space (rather than Option-Space) for "Select the previous input source". I don't know why it's that, because Command-Space has been Spotlight for ages. I also don't know what disabled it. But: maybe some installations still have that Command-Space shortcut assigned twice? That would show a warning in the keyboard preferences though. – Arjan – 2010-01-24T13:07:50.943

When I switch to an app that does not support the "British - Microsoft" setting i.e. automatically assumes "Swiss German", it appears to switch it for ALL applications. I don't understand why not all applications support 'another' language and I also don't understand why this forces the other applications to pick up the change. – adolf garlic – 2010-01-29T09:09:30.970

It is a global setting for the keyboard and thus for all apps. – user151019 – 2010-02-02T01:24:22.683

Sorry it is not - each app remembers what was used last - see http://mac.finerthingsin.com/2010/01/18/keyboard-layouts-tied-to-applications/

– user151019 – 2010-02-09T01:41:12.470

Actually it appears to have both. Single global setting and setting per app. The problem lies in the fact that once you set it to a language which is not supported by all apps, then it will switch to the other one. It sucks, seriously. – adolf garlic – 2010-02-14T19:26:00.647

For Catalina, find this at Keyboard -> Shortcuts -> Input Sources – eebbesen – 2020-02-25T17:12:47.213