Voodooprojects

VoodooPS2Controller => General Discussion => Topic started by: trip2me on May 05, 2009, 11:12:06 AM

Title: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 05, 2009, 11:12:06 AM
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

You can get more info about keyboard ID. look at below thread
http://forum.voodooprojects.org/index.php/topic,115.msg1071.html#msg1071
Keyboard 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
Code: [Select]
<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...
Code: [Select]
// 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.
(http://img23.imageshack.us/img23/7008/japanesekeyboard.jpg)
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
Code: [Select]
if (scanCode == 0xf2 || scanCode == 0xf1) {
         clock_get_uptime(&now);
         dispatchKeyboardEvent( PS2ToADBMap[scanCode], true, *((AbsoluteTime*)&now) );
}
patched into
Code: [Select]
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
Code: [Select]
        NX_KEYTYPE_VIDMIRROR,   0x7a,patched to
Code: [Select]
        NX_KEYTYPE_VIDMIRROR,   0x70,
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: lebidou on May 05, 2009, 11:42:03 AM
Hello,
I'm testing it on a French ISO keyboard and seems to work great here. Backlight/Sound Control keys are working (I won't test sleep because the Ati graphics won't wake up). F12 ejects the optical drive. The Make the Application key ino Right Window key option is very useful on laptops.

I'm testing this with regular ApplePS2Controller because I still have sutck keys with the voodoo one (a mysterious instance of AppleACPIPS2Nub.kext seems to load from nowhere, even if I clear all the boot caches, but this is another story).

anyway, thank you for adding some useful things to it!
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 05, 2009, 01:38:40 PM
Hello,
I'm testing it on a French ISO keyboard and seems to work great here. Backlight/Sound Control keys are working (I won't test sleep because the Ati graphics won't wake up). F12 ejects the optical drive. The Make the Application key ino Right Window key option is very useful on laptops.

I'm testing this with regular ApplePS2Controller because I still have sutck keys with the voodoo one (a mysterious instance of AppleACPIPS2Nub.kext seems to load from nowhere, even if I clear all the boot caches, but this is another story).

anyway, thank you for adding some useful things to it!


Thanks for reporting.

Maybe backlight works without kext, in my laptop it works as hardware level. Actually apple has special keytypes
Code: [Select]
#define NX_KEYTYPE_ILLUMINATION_UP 21
#define NX_KEYTYPE_ILLUMINATION_DOWN 22
#define NX_KEYTYPE_ILLUMINATION_TOGGLE 23
#define NX_KEYTYPE_BRIGHTNESS_UP 2
#define NX_KEYTYPE_BRIGHTNESS_DOWN 3
#define NX_KEYTYPE_CONTRAST_UP 11
#define NX_KEYTYPE_CONTRAST_DOWN 12

in my test, these are not worked with my laptop. : )
To work with these key event, need to make a new kernel extension, DSDT patch or other mod. I don't know well.

Update was adapted on VoodooPS2Keboard only. so you can refer to ApplePS2ToADBMap.h, VoodooPS2Keyboard.h, VoodooPS2Keyboard.cpp for patching ApplePS2Keyboard.
just copy and paste. it will work. : )
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: lebidou on May 05, 2009, 02:16:47 PM
About the ApplePS2Controller.kext, I'm actually using your pre-complied kext, I just edited the plist to replace the org.voodoo.driver.PS2Controller dependency by com.apple.driver.ApplePS2Controller and it works like charm. I did the same with with PS2Trackpad to bring me double finger scroll. There is actually no need to recompile the whole kext to make it work, voodoo ps2 drivers can be used with original applePS2controller (and reverse) with only plist editing.

For the backlight thing, I agree with you, it's probably a hardware thing but the first time I tried voodooPS2controller, it worked well except it broked backlight control as well as F12 key for some reason. And yes, on real Macs there is AppleBacklight.kext to handle backlight control via keyboard. On some laptops, adding PNLF device in dsdt is enough to make it works the "Mac way", but for others (like mine) it's completly useless.
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: dadaz on May 05, 2009, 04:50:34 PM
Hi

I will test it tonight on my EeePC 1000H.

Can you tell me which key should I use for volume, brightness... and is it possible to change them ?

Thanks.

Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 05, 2009, 05:57:23 PM
Can you tell me which key should I use for volume, brightness... and is it possible to change them ?

Hi. Thanks for testing in advance.

Volume keys and media keys have own standard scan code.
Also support special events on OS X. that means there are some way to assign keys.

in PS2ToADBMap at ApplePS2ToADBMap.h says:
Code: [Select]
    ADB,       PS/2,  key legend
    0x49,   // e0 2e  Volume Down
    0x48,   // e0 30  Volume Up
    0x34,   // e0 22  Play/Pause
    0x42,   // e0 19  Scan Next Track
    0x4d,   // e0 10  Scan Previous Track
DEADKEY,// e0 24  Stop
tells '0xe0 0x2e' PS/2 scancode is translated '0x49' ADB key code.
You can find Volume down key's standard scancode of PS/2 keyboard with MS HID to PS/2 table's 'PS/2 Set 1 Make' column
http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf

It concludes non-scancode making keys are not remapped with VoodooPS2Keyboard without any special modify.
But it also means that if you have a key which make scancode, remap it with any ADB key!

In attached files, I'm trying to remap the keys reasonably for public use.
So you can remap some specific key to already mapped keys.
For example, I'm a thinkpad X60 tablet user, I assigned Sysreq into Volume down, Break into Volume Up, WWW Back into Page down, WWW Forward into Page up and Media Stop into video mirror toggle.


What is for '0x49' ADB key code?

in appleUSAKeyMap at VoodooPS2Keyboard.cpp says:
Code: [Select]
        ...
        // special key definition
        0x0b, // number of special keys
        // ( NX_KEYTYPE,        Virtual ADB code )
        ...
        NX_KEYTYPE_MUTE,        0x4a,
        NX_KEYTYPE_SOUND_UP,    0x48,
        NX_KEYTYPE_SOUND_DOWN,  0x49,
        ...
        NX_KEYTYPE_PLAY,        0x34,
        NX_KEYTYPE_NEXT,        0x42,       // if this event repeated, act as NX_KEYTYPE_FAST
        NX_KEYTYPE_PREVIOUS,    0x4d        // if this event repeated, act as NX_KEYTYPE_REWIND
You can find more info about appleUSAKeyMap on below site.
http://www.xfree.org/current/dumpkeymap.1.html

Special keys are generally defined making no unicode charater. special keys worked with kernel's other parts or kexts. For example, brightness special key need a display kernel extension which support bright-control.

there are NX_KEYTYPE keys. borrowed from ev_keymap.h:
Code: [Select]
#define NX_KEYTYPE_SOUND_UP 0
#define NX_KEYTYPE_SOUND_DOWN 1
#define NX_KEYTYPE_BRIGHTNESS_UP 2
#define NX_KEYTYPE_BRIGHTNESS_DOWN 3
#define NX_KEYTYPE_CAPS_LOCK 4
#define NX_KEYTYPE_HELP 5
#define NX_POWER_KEY 6
#define NX_KEYTYPE_MUTE 7
#define NX_UP_ARROW_KEY 8
#define NX_DOWN_ARROW_KEY 9
#define NX_KEYTYPE_NUM_LOCK 10

#define NX_KEYTYPE_CONTRAST_UP 11
#define NX_KEYTYPE_CONTRAST_DOWN 12
#define NX_KEYTYPE_LAUNCH_PANEL 13
#define NX_KEYTYPE_EJECT 14
#define NX_KEYTYPE_VIDMIRROR 15

#define NX_KEYTYPE_PLAY 16
#define NX_KEYTYPE_NEXT 17
#define NX_KEYTYPE_PREVIOUS 18
#define NX_KEYTYPE_FAST 19
#define NX_KEYTYPE_REWIND 20

#define NX_KEYTYPE_ILLUMINATION_UP 21
#define NX_KEYTYPE_ILLUMINATION_DOWN 22
#define NX_KEYTYPE_ILLUMINATION_TOGGLE 23
I confirmed that SOUND_UP, SOUND_DOWN, MUTE, CAPS_LOCK, NUM_LOCK, HELP, POWER, EJECT, VIDMIRROR, PLAY,  NEXT, PREVIOUS, FAST, REWIND worked well.

If you understand relation between appleUSAKeyMap & PS2ToADBMap, you can remap most keys what you want.
Maybe it's possible to include above table definition into Info.plist. but i think it's not a good idea.
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: dadaz on May 05, 2009, 10:34:39 PM
Ok thanks for your great explanation.

But, it doesn't work really good for me. Keyboard work but not mouse (I've removed trackpad stuff as it doesn't work for me).

But when I try to boot in single mode, no way to type anything, I have "PS2CODE....." instead of what it must be.

And for the Volume... key, I don't have a keyboard which match (volume key are combination of Fn+F10/F11/F12) and brightness doesn't work.

Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 06, 2009, 03:55:23 AM
Ok thanks for your great explanation.

But, it doesn't work really good for me. Keyboard work but not mouse (I've removed trackpad stuff as it doesn't work for me).

But when I try to boot in single mode, no way to type anything, I have "PS2CODE....." instead of what it must be.

And for the Volume... key, I don't have a keyboard which match (volume key are combination of Fn+F10/F11/F12) and brightness doesn't work.

Sorry for your result.

But this update is limited in VoodooPS2Keyboard.kext only. No any modification was applied other kexts.
Your mouse problem aren't fixed with this. Or maybe you have a install mistaken. It needs more specific information about your failure to determine answer.

It's weird that you can't type anything in single mode. I think that it has some conflict your other kexts.

Trying to lebidou's method.
http://forum.voodooprojects.org/index.php/topic,304.msg1085.html#msg1085
I already said, this update is applied to ApplePS2Keyboard.kext identically.

in case of your volume and brightness key, you have to find scancodes yourself.
You may compile attached sourcecode to DEBUG mode, or you have to boot windows or linux and use xev like tool to find scancode.
Or it just works without kext support if it works with hardware method.
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: dadaz on May 06, 2009, 12:10:35 PM
I use official VoodooPS2 (without trackpad Kext) and I have NO problem with mouse.

Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 06, 2009, 01:34:32 PM
I use official VoodooPS2 (without trackpad Kext) and I have NO problem with mouse.


Unfortunately, I am assured that there isn't a relationship between a mouse problem and updated VoodooPS2Keyboard.kext at all.

If you don't believe this, use the diff tool.
And just change VoodooPS2Keyboard of official VoodooPS2Controller.kext with updated one.
That answers all about your mis-understanding.
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: cnnn on May 09, 2009, 04:51:19 PM
This works so great on my ideapad.
But I still have some media keys unused such as 5 EQ keys and 2 custom ones. I want to activate them. How can I find the code of them?
Title: Re: I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 09, 2009, 06:16:10 PM
This works so great on my ideapad.
But I still have some media keys unused such as 5 EQ keys and 2 custom ones. I want to activate them. How can I find the code of them?

I am sorry. I don't know about that.
If these keys make a scan code, you can simply remap it.
You can check scan code by watching console log with debug VoodooPS2Keyboard.kext version,
or showkey tool on linux, etc...

Or not, you have to make some special kext for it.

Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: f00barzes on May 16, 2009, 12:37:47 PM
Hello trip2me,

great to see someone working on making the full glory of PS2-Keyboards working!
If I might suggest some feature:
 
Update: Partly fail: While there are quite some Thinkpads that do not have Windows keys (everything before the 60 series, although they're all pre-Core processors), they keyboard mentioned was USB.
I've tried to rearrange the keys using DoubleCommand which worked more or less at some point. Although the comfort is rather low since DoubleCommand sets it for all keyboards and without profiles, so if one's switching input devices to the integrated keyboard which has windows-keys one gets a strange layout.
If one has some suggestions on how to handle this problem, maybe it could be discussed in another topic. (

Again, your efforts are highly welcome! Wish you lots of success and luck :D
Greets
f00barzes
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 16, 2009, 05:18:46 PM
If I might suggest some feature:
 
  • Enable the remap of e.g. the right Control-Key to an Apple Command-Key (the one with the funny rounded symbol)
  • Rationale: Quite some keyboards are still provided without a Windows-Key (e.g. the IBM UltraNav USB) and OS X is not really that usable without an Command-Key
  • Under Windows and Linux this is a standardfix, for Windows there's even a tool provided by IBM/Lenovo.
  • If I find some time, I'll might even try to add it myself, although I think that it might just be a (plist-based) remap of one one scancode.

Update: Partly fail: While there are quite some Thinkpads that do not have Windows keys (everything before the 60 series, although they're all pre-Core processors), they keyboard mentioned was USB.
I've tried to rearrange the keys using DoubleCommand which worked more or less at some point. Although the comfort is rather low since DoubleCommand sets it for all keyboards and without profiles, so if one's switching input devices to the integrated keyboard which has windows-keys one gets a strange layout.
If one has some suggestions on how to handle this problem, maybe it could be discussed in another topic.
(

Again, your efforts are highly welcome! Wish you lots of success and luck :D
Greets
f00barzes

Hello f00barzes,

I'd be happy for your suggestion. :)
I will consider your R_Ctrl->R_Cmd remapping  and other suggestions next update.

P.S.
I can't follow the sentences which are bold.
Do you have at least two ports of PS/2 keyboard on one computer?
and This project  don't support USB interface keyboards.

Sincerely,
trip2me
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: f00barzes on May 17, 2009, 10:43:00 PM
Hello f00barzes,

I'd be happy for your suggestion. :)
I will consider your R_Ctrl->R_Cmd remapping  and other suggestions next update.

P.S.
I can't follow the sentences which are bold.
Do you have at least two ports of PS/2 keyboard on one computer?
and This project  don't support USB interface keyboards.

Sincerely,
trip2me

Glad to hear that you think it's worthwhile! :D
The reason why I wrote "fail" was that I thought about an USB-Keyboard (http://www.amazon.com/IBM-USB-Keyboard-UltraNav-31P8950/dp/B00009APTK) while writing and only later I remembered that this was a project for PS/2 keyboards.
And the issue with multiple keyboards with different key-sets (with Windowskey/without Windowskey) was my PS/2 internal+USB external keyboard.

DoubleCommand (http://doublecommand.sourceforge.net/) is a tool to remap some of your keys even on USB-Keyboards, nevertheless made for Mac-Keyboards, providing one set of setting for all connected keyboards, no loadable/storable profiles and therefore a little bit uncomfortable for the task of making a windows-key-less keyboard working nice with OSX.
There is a second tool (http://www.pqrs.org/tekezo/macosx/keyremap4macbook/list.html) which might be usefull for that job.

Anyhow, that obviously is a second, different discussion that should not spoil and offtopicize your development thread.
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: trip2me on May 18, 2009, 05:57:15 AM
Glad to hear that you think it's worthwhile! :D
The reason why I wrote "fail" was that I thought about an USB-Keyboard (http://www.amazon.com/IBM-USB-Keyboard-UltraNav-31P8950/dp/B00009APTK) while writing and only later I remembered that this was a project for PS/2 keyboards.
And the issue with multiple keyboards with different key-sets (with Windowskey/without Windowskey) was my PS/2 internal+USB external keyboard.

DoubleCommand (http://doublecommand.sourceforge.net/) is a tool to remap some of your keys even on USB-Keyboards, nevertheless made for Mac-Keyboards, providing one set of setting for all connected keyboards, no loadable/storable profiles and therefore a little bit uncomfortable for the task of making a windows-key-less keyboard working nice with OSX.
There is a second tool (http://www.pqrs.org/tekezo/macosx/keyremap4macbook/list.html) which might be usefull for that job.

Anyhow, that obviously is a second, different discussion that should not spoil and offtopicize your development thread.
OK. I got it  ;)

DoubleCommand hooks the IOHIDSystem, but KeyRemap4Macbook intercepts IOHIKeyboard instances.
So KeyRemap4Macbook supports multiple keyboards up to 4. ( In KeyRemap4MacBook.hpp )
Anyway, these programs are upper layer than VoodooPS2Keyboard or IOHIDKeyboard.

VoodooPS2Keyboard mainly supports key recognition which can't be done in upper layers.
So I think that VoodooPS2Keyboard have to make a same result as IOHIDKeyboard as possible.
And than use KeyRemap4Macbook or DoubleCommand for keyboard remapping.

However a system has only one PS/2 keyboard port.
I think it's not bad to support additional remapping conveniences.
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: pmcnano on June 29, 2009, 08:20:07 AM
It works great on my Dell Studio 13 XPS, ....

BUT..theres always a but.....it breaks sleep by some reason..........when it wakes..the comptuer freeze =(...

cheers

pmcnano
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: bcc9 on July 13, 2009, 05:28:27 AM
I've tested your 20090511 version on my dell xps 1340 laptop, and it is an improvement over the stock 0.98 version in that there are no longer any scan code errors concerning the special keys (arrows,pg up, pg down, home, end).  With the kext cache fully wiped upon install it does not cause failures after resume from suspend as pmcnano indicated.

However, I cannot get the ALT keys to be recognized correctly like in 0.98.  The ALT key is important to work as an ALT key for emacs.

With 0.98 I have "Swap alt and windows key" set to false and so the alt keys work in emacs and work as mac option keys, and the windows key works as the mac command key.  (I think this should be the default but anyways...)

With your version, I set "Swap command and option" to false and the windows key works as the mac command key, but the alt keys generate a funky modifier key that doesn't do anything useful.  According to xev the keycodes for the left&right alt keys are correct but the modifier is "Mode_switch", and is setting the modifier state to 0x2000.

Am I missing something?  None of the other config options would seem to affect the alt key.  I don't see where the alt keys are getting mapped to the wrong modifier in your code.
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: bcc9 on July 14, 2009, 03:28:33 AM
However, I cannot get the ALT keys to be recognized correctly like in 0.98.  The ALT key is important to work as an ALT key for emacs.
I take it back the 0.98 version was also mis-classifying the ALT key such that it is not working right with emacs.  I must be pretty confused.  Anyways, here's xev details for the alt keys.  Notice the difference in how the modifier is being classified under OSX vs linux.  In the following I press & release the left alt key, then press and release the right alt key.  The modifier state comes up as 0x2000 under OSX and 0x8 under linux.  Under OSX:
Code: [Select]
left alt key:
KeyPress event, serial 24, synthetic NO, window 0x600001,
    root 0x1fd, subw 0x0, time 1967237388, (21,73), root:(23,75),
    state 0x0, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0x600001,
    root 0x1fd, subw 0x0, time 1967237483, (21,73), root:(23,75),
    state 0x2000, keycode 66 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:

right alt key:
KeyPress event, serial 24, synthetic NO, window 0x600001,
    root 0x1fd, subw 0x0, time 1967259782, (21,73), root:(23,75),
    state 0x0, keycode 69 (keysym 0xff7e, Mode_switch), same_screen YES,
    XKeysymToKeycode returns keycode: 66
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0x600001,
    root 0x1fd, subw 0x0, time 1967259924, (21,73), root:(23,75),
    state 0x2000, keycode 69 (keysym 0xff7e, Mode_switch), same_screen YES,
    XKeysymToKeycode returns keycode: 66
    XLookupString gives 0 bytes:
Under linux:
Code: [Select]
left alt key:
KeyPress event, serial 34, synthetic NO, window 0x1600001,
    root 0x1e1, subw 0x0, time 55696, (50,111), root:(1086,417),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1600001,
    root 0x1e1, subw 0x0, time 55824, (50,111), root:(1086,417),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

right alt key:
KeyPress event, serial 34, synthetic NO, window 0x1600001,
    root 0x1e1, subw 0x0, time 68133, (104,126), root:(1140,432),
    state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1600001,
    root 0x1e1, subw 0x0, time 68210, (104,126), root:(1140,432),
    state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: BladeRunner on July 14, 2009, 04:40:32 AM
I have been using the original VoodooPS2Contorller kext  with my Leopard 10.5.7 system.  The only problem has been the need for Ukelele and a Logitech keyboard layout to get the  ` and ~  symbols on the key to the left of the "1".

When I tried to use the [05/11/09] updated VoodooPS2Keyboard my Logitech trackball stopped working.  I used the VoodooPS2Crontroller kext from your package and placed it first in the /Extra/Extensions.mkext and later in /S/L/E.  In both attempts I made sure the ownership and permissions were set prior to re-boot.  In both attempts, the system would boot to the login screen and I could type in the password field, but the mouse function was gone.

Also, I get the same results on SL-10.6

My system is an IBM ThinkCentre (8183) desktop running a P4 Prescott socket 478.  It has 2Gb ram and a 19 inch CRT on a EVGA GeForce 8400 GS graphics card.  The keyboard & mouse are connected to this and two other systems via a kvm switch.

If there are any suggestions on how to get the mouse/trackball working I would like to give it another try.

Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: BladeRunner on July 18, 2009, 09:13:07 PM
I have been using the original VoodooPS2Contorller kext  with my Leopard 10.5.7 system.  The only problem has been the need for Ukelele and a Logitech keyboard layout to get the  ` and ~  symbols on the key to the left of the "1".

When I tried to use the [05/11/09] updated VoodooPS2Keyboard my Logitech trackball stopped working.  I used the VoodooPS2Crontroller kext from your package and placed it first in the /Extra/Extensions.mkext and later in /S/L/E.  In both attempts I made sure the ownership and permissions were set prior to re-boot.  In both attempts, the system would boot to the login screen and I could type in the password field, but the mouse function was gone.

Also, I get the same results on SL-10.6

My system is an IBM ThinkCentre (8183) desktop running a P4 Prescott socket 478.  It has 2Gb ram and a 19 inch CRT on a EVGA GeForce 8400 GS graphics card.  The keyboard & mouse are connected to this and two other systems via a kvm switch.

If there are any suggestions on how to get the mouse/trackball working I would like to give it another try.


To reply to my own post :(

Update : Well, in the for-what-it's-worth category,  after a good nights sleep, I resolved the problems.

I extracted VoodooPS2Keyboard.kext  from your release VoodooPS2Controller.kext.  I changed the Info.plist "alt_handler_id" value to  "27" for PS2 keyboard and used this new keyboard kext to replace the one in the original VoodooPS2controller.kext

I have tried this modified controller/keyboard kext in both 10.5.7 and 10.6 systems.  In both cases, using the default US keyboard, it works and provides the correct key mapping for my PS2 keyboard.

Many thanks for the updated keyboard kext.  This is a much better solution than using Ukelele.
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: youminbuluo on July 29, 2009, 02:43:59 AM
i used the kext from http://forum.voodooprojects.org/index.php/topic,235.0.html
but it got the wrong keyboard type and f12 didn't work


the update really solves all the problems for me^_^
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: yushir0 on August 17, 2009, 10:06:12 PM
Take a look here for the asian keys: http://www.opensource.apple.com/source/IOUSBFamily/IOUSBFamily-210.4.5/AppleUSBKeyboard/Classes/Cosmo_USB2ADB.cpp

May you also take a look at this?

kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x3b 0xbb F1
0x3c 0xbc F2
0x3d 0xbd F3
0x3e 0xbe F4
0x3f 0xbf F5
0x40 0xc0 F6
0x41 0xc1 F7
0x42 0xc2 F8
0x43 0xc3 F9
0x44 0xc4 F10
0x57 0xd7 F11
0x58 0xd8 F12
0x46 0xc6 BLOQ DESPL
0xe1 0x1d 0x45 0xe1 0x9d 0xc5 PAUSE
0xe0 0x52 0xe0 0xd2 INS
0xe0 0x53 0xe0 0xd3 SUPR

WITH FN KEY (INVERSE ORDER)
0xe0 0x2a 0xe0 0x37 0xe0 0xaa 0xe0 0xb7 PET SIS
0xe0 0x2a 0xe0 0x37 0xe0 0xaa 0xe0 0xb7 IMPR PA
0x1d 0xe1 0x1d 0x45 0xe1 0x9d 0xc5 0x9d INTER
0x45 0xc5 BLQ NUM
0xe0 0x30 0xe0 0xb0 0xe0 0x30 0xe0 0xb0 SOUND UP
0xe0 0x2e 0xe0 0xae 0xe0 0x2e 0xe0 0xae SOUND DOWN
0xe0 0x20 0xe0 0xa0 SOUND MUTE
0xe0 0x54 0xe0 0xd4 BRIGHTNESS UP
0xe0 0x4c 0xe0 0xcc BRIGHTNESS DOWN
0xe0 0x12 0xe0 0x92 LOCK
0xe0 0x5f 0xe0 0xdf SLEEP
0xe0 0x56 0xe0 0xd6 WIDESCREEN
0xe0 0x32 0xe0 0xb2 BROWSER
0x1d 0x19 0x99 0x9d PRINT
0xe0 0x75 0xe0 0xf5 HELP
0xe0 0x5d 0xe0 0xdd APPLICATION

I took these on an HP's 6720s.

HP's brightness keys scancodes do not match Apple's ones, there's a way to change that? I need at least to remap them to another key (like FXX) as with Proxi you can map them directly to System-specific keys (ie, brightness ones).

Also, i've got a big problem with the interrupt key; i managed to get it work with ApplePS2Keyboard as mac took it as 0x46 scancode, so it could be mapped with ease. But the problem was that the output is Left Control + (0x46 scancode's key).

As far as the other key's i've got around fixing them as far as i did with ApplePS2Controller.

PD: If you want to take my opiniion in mind, i'd map brightness keys as normal ones cuz apple's blacklight kext works as hell with some displays, but it can't be solved with ease by using "shades" on those keys (They must be useable, like FXX).

Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: simargl on August 19, 2009, 03:52:42 AM
Hi,

I installed your update on MSi EX720 Laptop running iAtkos v7 vanilla updated to 1.5.8
and, finally, my keyboard is recognized properly as ANSI.

Your update solved my trouble, thank you very much :)

I had trouble with VoodooPS2 official driver, trackpad was working perfectly, but keyboard was hardcoded as ISO, so cmd-` and cmd-shift-~ shortcut was non-working in majority of applications.

Interesting thing: after using Ukelele (with official VoodooPS2) to remap key-layout, cmd-` worked in some apps, like iTerm or Terminal, but Safari, TextEdit etc... refused any action on shortcut.
Point is: what is really keyboard shortcut for OS X app? cmd-ASCII or cmd-KeyCode?

And plist is really neat now!

Anyway, thank you one more time :)

Cheers!
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: Egle on August 24, 2009, 09:02:24 AM
Hi all,

Your work is amazing  ;D !!

All my key work even my front multimedia key and two finger scrolling work perfectly.

Original version of this kext never functioned on my laptop until now with your great kext.

I have Dell inspiron 6400 laptop

Thanks very very much !!!!!!!
Title: Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
Post by: JrCs on April 18, 2010, 10:23:10 AM
Thanks Trip2me for your modification. I have only one problem: i can't compile the kext on 10.6.2.

It's seems that ApplePS2Controller Headers is missing and when i try to build i have that error:

Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.

Do you know how to compile on 10.6.2 ?

Thanks in advance.