Thursday, December 10, 2009

Fixing Keyboard Type Problems

Macs normally have one of three different physical keyboard types, which Apple calls JIS (for Japan), ISO (used in Europe, for example) and ANSI (used in the US). ISO has one key more than ANSI -- it is located between z and shift -- and JIS has quite a few differences.

Sometimes a machine will forget which type keyboard is attached, with the result that certain keys get transposed from what the user expects. The fix for this is run the Keyboard Setup Assistant again. Sometimes there is a button for "Change Keyboard Type" visible in System Preferences/Keyboard. If not, you can try trashing the file

/Library/Preferences/com.apple.keyboardtype.plist

(Note that this is in the Library folder, not System/Library and not Users/username/Library)

Another possibility may be to open Terminal and type:

sudo open /System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardSetupAssistant

Sometimes, when JIS is involved on a laptop, one may have to follow the procedures in the SMC Resetting instructions.

If none of those work, this Karabiner option may be helpful.

Also see the last few answers at this page.

For reference, this doc shows the different keyboards supplied by Apple around the world.

21 comments:

Paul D. said...

Interesting, I never knew how many physical keyboard layouts there were.

Looking at that support page, I see no Chinese keyboard other than the Taiwanese one. What does Apple sell in China?

Tom Gewecke said...

I think China mainly uses ordinary English QWERTY keyboards and pinyin input.

Bob said...

That's true about China. I lived for a few years. They use the ANSI with pinyin input. Some actually have radicals on the keyboard, but still have the pinyin.

I didn't know the different physical keyboards until I just bought the Apple small bluetooth keyboard in Jordan. It's ISO. Not only is there an additional key between the Shift and Z, but the key above and right of Enter is the left half of the place of Enter. Enter becomes a tall skinny key. This took some getting used to. It makes no sense to me. I'm sure it does in certain usages.

Magnus Lewan said...

Interesting. Do you happen to have any explanation for the following?

I am typing this using a JIS wireless keyboard connected to a MacBook with a built in UK keyboard.

If I choose UK as keyboard layout, the key two steps to right of L is an apostrophe - '. This corresponds to the physical keyboard on the MacBook.

However, if I choose U.S. Extended as keyboard layout, the same key is colon - :. That corresponds to the physical indication of the JIS keyboard.

Using the MacBook's built in keyboard, the same key gives apostrophe - ' - with either keyboard layout.

Why the difference?

Tom Gewecke said...

Magnus -- Very strange! What happens if you choose the Greek keyboard layout, which is Unicode like US Extended?

Magnus Lewan said...

Both Greek and Greek Polytonic behave like UK keyboard, no trace of any colon.

Perhaps Apple made some explicit modification to U.S. Extended to make it easier to use for Japanese users.

(Doesn't "Greek Polytonic" sound like a drink? Or is that just me?)

Jonathan said...

Hi,

I have been having a weird problem with Chinese input recently, which may be connected to this post. In case you have an idea of what is happening, here is my story:

I have a Japanese iMac (27", bought in Jan. 2010), with JIS keyboard, and uses Japanese as my default locale. However, I type often in French and sometimes in Chinese, so I enabled the French layout and the Chinese Pinyin one. When French layout is enabled (i.e., ticked in the "Language and Text" input source menu), then the layout used for Chinese is the French one, which can be confirmed by launching the "keyboard viewer". However, if I untick French in the input source menu, then the layout used for the Pinyin mode goes back to US...

This is very annoying, as French keyboards are not really designed to type Pinyin efficiently, plus I need to blind type :)

In general, I find the language usage in OS X not that intuitive. For example, I haven't figured out a way to select my "default" input layout, i.e., the layout which will be used when a new application is opened. Sometimes it seems to be French by default, sometimes Romaji (which I would prefer and that I would expect, as Japanese is my default locale), and I couldn't figure out the rationale, and it didn't seem to be related to the last layout I used before shutting the application. I use the option to have a different layout for each document, but I don't see why this should influence the above, unless that it becomes really painful to change each and every window (and even each field in Firefox!) back to Romaji separately...

Btw, I am using Snow Leopard 10.6.3.

Thanks in advance for any input on this! (no pun intended)

Jonathan

Tom Gewecke said...

Jonathan -- Do you really like using AZERTY to type French? If not, it is not hard using either US or US International PC instead, which might solve your problem. Best to email me for further advice (tom at bluesky dot org).

Sorry, I have no fixes for the default layout issues.

JuliaJ said...

Hi I have exactly the problem you describe: my Mac mini has forgotten the keyboard and there is no Change keyboard type button visible in sys preferences/keyboard.
There is no file /Library/Preferences/com.apple.keyboardtype.plist to trash and running the sudo command gives me the message no known keyboard (it's a French MS Comfort curve, recognised in the initial startup). The keyboard viewer shows me a key layout for French - numerical that is quite incorrect (eg no < key next to the shift key)
Any ideas what to try next so that I can run the keyboard setup assistant ?
Thanks

Tom Gewecke said...

JuliaJ -- the only thing I can think of is to try to reset the PMU or SMC.

http://support.apple.com/kb/HT2183
http://support.apple.com/kb/HT3964

Sorry, I have no idea if doing that could cause other problems.

Unknown said...

I posted a similar problem, wanting to force an 102key ISO keyboard to behave like 101 ANSI (proper tilde key).

https://discussions.apple.com/message/15594939#15594939

Do you know how can I force OS X to use ANSI, using the keyboard assistant doesn't seam to work.

The keyboard is the apple wireless one with Romanian layout (102 keys) and I want to use it just like a normal US English. Thanks.

Tom Gewecke said...

Sorin -- Sorry, I don't have any advice more than what is already in the blog.

Anonymous said...

Why does my wireless mac keyboard type bz ever time I press b and qt every time I press t and ag everytime I press a. Pls help this is driving me mad!!
Thanks in advance

Tom Gewecke said...

Sounds like your keyboard is broken to me. Try another one.

Anonymous said...

button for "Change Keyboard Type" visible in System Preferences/Keyboard
this worked for me

Allan Tépper said...
This comment has been removed by the author.
dunxd said...

This is still an issue in 2019 with Mojave 10.14.6. In my case, using a Logitech K810 UK layout keyboard, the type gets set to ANSI, the Change Keyboard Type button has disappeared, and running Keyboard Setup Assistant from command line gets the error "No unknown keyboard connected - terminating" instead of running the Assistant.

Fortunately installing Karabiner Elements from https://pqrs.org/osx/karabiner/ then running it triggered the Assistant and I could resolve the problem. Hopefully that will work long term. Hope this helps others who find there way to this very useful blog post!

Matze said...

Hi there, it is still in 2022. Mac OS 11.6.2 Big Sur.
My HHKB Hybrid is not fully recognized as ISO with German layout.
The last four keys in the upper Numbers row are ß/?, ´/`, no effect/no effect, no effect/no effect

Any suggestions?
Best, Matze

Tom Gewecke said...

Sorry Matze, no idea. Try posting in a help forum like https://apple.stackexchange.com

Anonymous said...

My external mac keybooard was typing JIS even though I didn't change it. I didn't have the file to delete. It just wasn't there. I tried restarting - didn't work. When I clicked on "Set Up Bluetooth Keyboard" it would say "No Keyboard Found" even though I was typing on it. all the fixes were posted to message boards and finally,

I just thought to unpair and reconnect the keyboard and it fixed it.

Grant Slater said...

2023 and this is still a problem. Latest OSX (13.4) and it still every few months forgets the KeyboardSetAssistant setting.

Steps to fix: 1) Delete /Library/Preferences/com.apple.keyboardtype.plist 2) Reboot 3) KeyboardSetAssistant pops up.

Annoying.