Hello.
I'm updating VoodooPS2Keyboard source code.
But I have a laptop only. I can't test keys that I don't have.
If you have a time, test it and report some problem or requirements please.
After testing is done, I will submit result to VoodooPS2Controller svn repository.
I'm a ANSI and Korean keyboard user.
So I'm curious that other Language layout keyboard such as Europe and Japanese works well with this.
Because some Language keyboard have special keys and special input method, it have to be considerd making kernel extension. such as Japanese Kana, Eisu and ISO keyboard's §±
And other special keys such as sleep, power, volume up, play/pause, ...
main update issues are
- Update PS2ToADBMap table in ApplePS2ADBMap.h to change easily.
So we just simply change PS2ToADBMap without concerning conflict between normal and extended scancode. - Enable media keys( play, next track, ...), F16~F20 by updating appleUSAKeyMap in VoodooPS2Keyboard.cpp
- Add some custom options in Info.plist
- Select between ANSI and ISO layout
- Support Korean Keyboard(Hangul, Hanja) and Japanese JIS(Henkan, Muhenkan, ... not implemented completely yet. report please.)
- Change Application(Windows Context menu) key into right windows key.(useful for laptop users)
- Change Application key into Apple Fn key (not implemented completely yet.)
just Fn key recognizes, other key combo need to be developed - Enable to assign custom keyboard type (for changing keyboard layout)
you can check changed keyboard layout using 'Show Keyboard Viewer'
You can get more info about keyboard ID. look at below thread
http://forum.voodooprojects.org/index.php/topic,115.msg1071.html#msg1071Keyboard type affect your input method and input layout. It's very important.
I want to tell you about all detail changes. But I'm not a good English speaker. Sorry about that.
I think we have to get more information about ApplePS2ADBMap, appleUSAKeyMap table. Still I don't know well.
But I added some comments to the source code. I wish it would help you.
To support apple Fn key perfectly, maybe appleUSAKeyMap have to be discovered more.
If you check your keyboard's PS/2 scancode, build VoodooPS2Keyboard with Development configuration.
It generates scancode log that you press to /var/log/system.log
It maybe use for report bug or requirements.
P.S. default custom setting value of VoodooPS2Keyboard.kext/Contents/Info.plist
<key>Make Application key into Apple Fn key</key>
<true/>
<key>Make Application key into right windows</key>
<false/>
<key>Make right modifier keys into Hangul and Hanja</key>
<false/>
<key>Swap capslock and left control</key>
<false/>
<key>Swap command and option</key>
<true/>
<key>Use ISO layout keyboard</key>
<false/>
<key>alt_handler_id</key>
<integer>3</integer>
alt_handler_id means keyboard type.
It determine F12 eject function enable or not.
To enabling F12 eject key, refer above link which was already mentioned.
I think it's enough for users to use some values. There are...
// below layouts are SUPPORT F12 Eject function
Unknown 3rd party keyboard. = 3 // it's possible to change keyboard layout in System Preferences.
original USB Domestic (ANSI) Keyboard = 198
original USB International (ISO) Keyboard = 199
original USB Japanese (JIS) Keyboard = 200
// below layouts are NOT SUPPORT F12 Eject function
USB Pro Keyboard Domestic (ANSI) Keyboard = 204
USB Pro Keyboard International (ISO) Keyboard = 205
USB Pro Keyboard Japanese (JIS) Keyboard = 206
If you are a
Japanese keyboard user, it's very important too.
Look at below attached picture. There are some keys which only works on JIS layout only, and which keys are remapped into mac keyboard.
So it's a good choice 200 or 206 for 'alt_handler_id' if you want to use kotoeri Japanese input method.
In addtion, if you are a qwerty laptop keyboard user, enabling 'Make right modifier keys into Hangul and Hanja' into true makes right alt key into Japanese Kana key and right control key into Japanese Eisu key.
If you are a
Europe ISO layout keyboard user, change 'Use ISO layout keyboard' to '<true/>'.
It replace Europe 1'`~' key which is to the left of '1' into between Left shift and 'z' keys.
And Europe 2 key is inserted into the place which was Europe 1 key's place.
and you may change 'alt_handler_id' to what you want.
[updated 05/09/09]fixed Korean Hangul, Hanja keys repeat problem.
If you don't use Korean 103 or 106 keyboard, you can ignore this update.
371 line in VoodooPS2Keyboard.cpp
if (scanCode == 0xf2 || scanCode == 0xf1) {
clock_get_uptime(&now);
dispatchKeyboardEvent( PS2ToADBMap[scanCode], true, *((AbsoluteTime*)&now) );
}
patched into
if (scanCode == 0xf2 || scanCode == 0xf1) {
clock_get_uptime(&now);
dispatchKeyboardEvent( PS2ToADBMap[scanCode], true, *((AbsoluteTime*)&now) );
clock_get_uptime(&now);
dispatchKeyboardEvent( PS2ToADBMap[scanCode], false, *((AbsoluteTime*)&now) );
return true;
}
[updated 05/11/09]fixed video mirroring toggle problem when F1 key is pressed.
It's my mistake. really sorry.
891 line in VoodooPS2Keyboard.cpp
NX_KEYTYPE_VIDMIRROR, 0x7a,
patched to
NX_KEYTYPE_VIDMIRROR, 0x70,