First of all, I'm not a good English speaker. There are mis-understanding between you and me.
And I can't express all thing that I think and I know to English well.
So if I understand that patch correctly, you just changed the default keyboard, but you didn't prevent a different keyboard from being used, should such a different keyboard type be indicated in the IORegistry?
What you mean? I can't follow you. For preventing a different keyboard, it needs to be implemented feature that I already said.
Well, you had listed a piece of code that you said was changed, and the definition of APPLEPS2KEYBOARD_DEVICE_TYPE changed from 205 to 3 in that line. I understood this to alter the default keyboard type from a 102 to a 101 key keyboard.
I mean below site. Not the code.
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-12.html#kcf2http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html#keyboardidYou can just change 'alt_handler_id' of VoodooPS2Keyboard.kext/Contents/Info.plist.
http://forum.voodooprojects.org/index.php/topic,304.0.html
But it is needed to update /System/Library/Extensions.mkext again.
So, if you use various layout PS/2 keyboard and switch it often, 'alt_handler_id' method would be annoying work.
OK, I'll check that out...
For me, only the default keyboard matters, since when I hook up an external USB keyboard, it seems to be recognized correctly, it's just the built-in PS2 keyboard that has an issue...
USB keyboard isn't related with VPS2 at all. It is worked with IOHIDKeyboard.cpp part in IOHIDFamily.kext.
So, its layout is recognized and worked independently from VoodooPS2Controller. When you press any key from USB, Keyboard Viewer's layout changed promptly. After when you press any key from PS/2, it is changed too.
If you have one PS/2 keyboard, the problem is simple.
By the way, if keys are entered correctly, how about you might ignore Keyboard viewer's layout?
In my case, I use a thinkpad laptop's internal PS/2 keyboard. I don't have a extra keypad. But keyboard viewer shows a keypad. But I ignore it. Because it doesn't make any problem to use OS X.
Well, your keyboard shows a numeric keypad, because when you use the Fn keys, it will generate these key codes. The software doesn't know about the physical layout, but about they key codes that the keyboard can generated, and using the Fn keys, you can generate the codes of the separate keypad, which is important since some apps assign special functions to these keys (e.g. terminal emulators that emulate a VT100 keypad).
It's not the point to refer my keyboard example. I should not have metioned it. Sorry : )
Anyway what did you mean Fn key? In thinkpad's one? or Apple's one? It's totally differant thing.
Also VT100 isn't related VPS2. Because nowadays OS X never know PS/2 Keyboard, and there are not any PS/2 scan-code supports. Nothing.
Also, the keyboard layout matters because different keys have different characters on them. That's really the issue here, because the key next to the number 1 key has ~ and ` on it on a 101 key keyboard, but it has § and ± on it on a 102 key keyboard. The key with the ~ and ` on it is next to the letter z on the 102 key keyboard, and that key is plain missing on a 101 key keyboard.
Therefore to reprogram what character is returned would cause the improper behavior when a real 102 key keyboard is attached, since it now would no longer return the required § and ± keys at that location, but would return ~ and ` instead.
If you look at the images in detail that I attached to one of my prior posts, you will see what I mean. The "wrong" keys returned right now are actually the right keys given what keyboard the software thinks is attached. What is wrong is that it thinks a 102 key keyboard is attached, when in fact it's a 101 key keyboard, or a laptop keyboard that emulates a 101 key keyboard by using the Fn keys to create a pseudo keypad.
Your former attached picture is a ISO layout. It can be seen well in Europe countries.
Improper situation is considered some point of view.
1. Does each keys actually make proper PS/2 scancode like standard scancode which was printed on keycap character?
2. When press the key, does it make proper character on OSX?
3. When press the key, is it assigned proper position on OSX's Keyboard viewer?
So... read my thread 'Europe ISO layout keyboard' part. And try it.
http://forum.voodooprojects.org/index.php/topic,304.0.htmlIf you have a improper working with enabling "Use ISO layout keyboard" option, try below method please.Because I've never seen ISO PS/2 keyboard. I want to know the two keys.
I wonder what is the PS/2 scancodes for '§±' and '~`' key each on 102 ISO PS/2 keyboard.
I think that '§±' makes 0x56 and '~`' makes 0x29.
Use below debug VoodooPS2Controller.kext version.
How to capture the PS/2 Scan Code with attached kext.
1. Install attached kext. (If you want, use kext helper.(
http://www.cheetha.net/Kext_Helper/Software.html ) or install manually)
2. After reboot, open Console.app. Select 'System.log'.
3. Press '§±' and '~`' keys one time each.( you don't have to input shift key. )
4. Capture the messages like 'ApplePS2Keyboard: PS/2 scancode 0x??'.
?? value is PS/2 scan code for these keys. Look at below example picture.
* You realize that Keyboard viewer doesn't make debug message, when you click the Keyboard viewer's key.
That means it isn't related with physical PS/2 Keyboard at all
When you reply the test result, I will fix the VPS2.
P.S.
I modify superhai's vpower source code into vps2kbd.
It change HIDSubinterfaceID online.
You can change whatever you want. Refer to below link for choosing keyboard_id
http://forum.voodooprojects.org/index.php/topic,115.msg1071.html#msg1071