Author Topic: Key valus different with VoodooPS2Controller  (Read 18376 times)

0 Members and 1 Guest are viewing this topic.

BladeRunner

  • Member
  • Posts: 88
Key valus different with VoodooPS2Controller
« on: April 14, 2009, 10:35:37 PM »
I installed the VoodooPS2Controller kext several days ago and it appeared to be working corectly.  That is a good thing because it allowed me to remove the patched versions of ApplePS2Crontroller and ApplePS2nub I had been using.

However I just noticed to day that one of the keys has a new value set from what it had before.  In the upper left, the key above the Tab key is labeled and used to produce a back tick or tilde depending on the state of the shift key.  Now, however, it produces a § and a ± depending on the shift key. 

I looked in the two Info.plist files in the kext contents to see if there was a value there that would correct this - no joy. Does anyone know haw to change the key value back without removing VoodooPS2 controller?
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

slashack

  • Member
  • Posts: 30
Re: Key valus different with VoodooPS2Controller
« Reply #1 on: April 14, 2009, 10:38:11 PM »
I noticed this also. This is more or less what happened to me with the F12 and the Eject key. Now i cannot eject dvds by keeping F12 pressed. And now the back tick or tilde is somewhere else.


SP1950

  • Observer
  • Posts: 10
Re: Key valus different with VoodooPS2Controller
« Reply #2 on: April 15, 2009, 06:44:12 AM »
mine also

the key next to 1 is altered

i had to change the keyboard shortcuts to re-enable the "switch thru windows" cmd

lebidou

  • Resident
  • Posts: 133
Re: Key valus different with VoodooPS2Controller
« Reply #3 on: April 15, 2009, 11:14:51 AM »
I also have the "eject/F12 key" issue, the key at left to 1 does nothing, and my backlight control (Fn + F7/F8) is broken. Adding PNLF in DSDT never helped.

BladeRunner

  • Member
  • Posts: 88
Re: Key valus different with VoodooPS2Controller
« Reply #4 on: April 15, 2009, 05:58:01 PM »
I have learned that there are some places where keyboard layouts are placed.  One, for the system is placed in /Library/Keyboard Layouts.  The other, for an individual user is /Users/your-id/Library/Keyboard Layouts.  Both folders exist on my system and both appear to be empty.

This looks like a place to put configuration data, but I never came across the file name or syntax.  If anyone knows more about this, could you please provide some pointers?
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

lebidou

  • Resident
  • Posts: 133
Re: Key valus different with VoodooPS2Controller
« Reply #5 on: April 15, 2009, 06:19:36 PM »
You can use Ukulele for remapping keys (you'll get a *.keylayout file to place in ~/Library/Keybord Layouts. The new layout will appear in the Input Menu (International prefpane).

I use it because I have a french azerty pc keyboard.

I'm not sure it will fix the F12/eject issue though.

EDIT: You can solve the missing "next to the 1 key" with Ukulele but the F12/Eject issue can't be solved this way.
« Last Edit: April 16, 2009, 12:10:57 AM by lebidou »

BladeRunner

  • Member
  • Posts: 88
Re: Key valus different with VoodooPS2Controller
« Reply #6 on: April 16, 2009, 03:11:15 AM »
Yes,  I got a copy of Ukulele and it did fix the problem.  It took several attempts to learn how to use the program to swap two key sets, but once I learned that it was easy to get back my ~ and ` characters.  Thanks for the pointer.
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

wingrunr21

  • Entrant
  • Posts: 2
Re: Key valus different with VoodooPS2Controller
« Reply #7 on: April 21, 2009, 09:47:08 PM »
While you can most certainly use Ukelele to fix this this is a bug in the actual kext considering that the ~ key is standard on all 101 key US keyboards and there is not a § key.  macgirl has already patched this.

http://forum.voodooprojects.org/index.php/topic,141.msg561.html#msg561

BladeRunner

  • Member
  • Posts: 88
Re: Key valus different with VoodooPS2Controller
« Reply #8 on: April 24, 2009, 10:47:57 PM »
I have no explanation for this, but my keyboard has reverted to the starting point.  Even though I have the key layout file in "/Library/Keyboard Layouts", it no-longer shows up in the Preferences -> International and the keys are now "§" and "±" inplace of back-tick and tilde.

The layout I made with Ukelele worked just fine for about 3 days and then stopped. ????????  I got the source for VoodooPS2Controller and will try to patch it locally.
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

wingrunr21

  • Entrant
  • Posts: 2
Re: Key valus different with VoodooPS2Controller
« Reply #9 on: April 27, 2009, 07:34:02 AM »
BladeRunner I have attached my kext that is already patched properly.  I like having my Windows key default to the Command key on my keyboards so the kext is also configured that way.  If you would rather your alt key be your command key you can change the setting back in the VoodooPS2Keyboard.kext Info.plist

BladeRunner

  • Member
  • Posts: 88
Re: Key valus different with VoodooPS2Controller
« Reply #10 on: April 27, 2009, 10:16:35 AM »
Many thanks.  I had been experimenting with the Logitech US International layout that came with Ukelele with some success.  I will give this one a try. It would be better if the kext worked directly - without the International layouts.
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

rcfa

  • Member
  • Posts: 47
The kext recognizes a 102 key keyboard instead of the 101 key keyboard
« Reply #11 on: May 23, 2009, 12:04:42 PM »
There are two US keyboard layouts: the 102 key (I think, I didn't count ;) ) which has the tall return key on the right hand side and moves the pipe and backslash key next to the single and double quote key, and then there's the 101 key keyboard, with a wide return key, that's only a standard key high.

The former of these two has the paragraph sign next to the 1 key, because the left shift key is smaller such that there is space for the backquote/tilde key between it and the z key.

The latter has the backquote/tilde key next to the one key. I attach pictures that show the Mac OS X keyboard viewer's display of both types of keyboard. The kext recognizes the 102 key version, even if what's present is the 101 key version. So what needs to be changed is the detection code, not a patch that returns a different character for the key.

The fact that the wrong keyboard is recognized you can double check by using the keyboard viewer from the input method menu, and you will see that it shows you a 102-key style keyboard.
« Last Edit: May 23, 2009, 12:11:55 PM by rcfa »

rcfa

  • Member
  • Posts: 47
Re: Key valus different with VoodooPS2Controller
« Reply #12 on: May 28, 2009, 01:58:05 AM »
BladeRunner I have attached my kext that is already patched properly.  I like having my Windows key default to the Command key on my keyboards so the kext is also configured that way.  If you would rather your alt key be your command key you can change the setting back in the VoodooPS2Keyboard.kext Info.plist

What is patched? The keyboard recognition code, or are just the keycodes being hard-swapped?
Because as I have documented in a previous post, the problem is that the wrong type of keyboard is recognized, not that for the type of keyboard that the extension thinks it has it returns the wrong key codes...

I'd love to see this fixed for real, i.e. have the keyboard type recognition being patched...

trip2me

  • Observer
  • Posts: 21
The kext recognizes the 102 key version, even if what's present is the 101 key version. So what needs to be changed is the detection code, not a patch that returns a different character for the key.

The problem is that there isn't any keyboard layout detection feature on PS2Keyboard.kext
Keyboard layout recognition is selected by examining IORegistry's HIDSubinterfaceID

Here is a part of updated VoodooPS2Keboard.cpp

Code: [Select]
//#define APPLEPS2KEYBOARD_DEVICE_TYPE 205 // Generic ISO keyboard
#define APPLEPS2KEYBOARD_DEVICE_TYPE 3   // Unknown ANSI keyboard

...

UInt32 ApplePS2Keyboard::deviceType()  {
    OSNumber    *xml_handlerID;
    UInt32      ret_id;

    if ( xml_handlerID = OSDynamicCast( OSNumber, getProperty("alt_handler_id")) )
        ret_id = xml_handlerID->unsigned32BitValue();
    else
        ret_id = APPLEPS2KEYBOARD_DEVICE_TYPE;

    return ret_id;
};

It just retrurn the APPLEPS2KEYBOARD_DEVICE_TYPE value or user assigned value in Info.plist without any detection process. It determines HIDSubinterfaceID value.

I read below sites. There are some start point for recognizing keyboard layout automatically.
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-12.html#kcf2
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html#keyboardid
Let's be a realist, however, keep impossible dream in our mind. -Che Guevara
All good that I do or have done is from Allah, and only the mistakes have been mine.  -Malcolm X

rcfa

  • Member
  • Posts: 47
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?

The problem is that there isn't any keyboard layout detection feature on PS2Keyboard.kext
Keyboard layout recognition is selected by examining IORegistry's HIDSubinterfaceID

It just retrurn the APPLEPS2KEYBOARD_DEVICE_TYPE value or user assigned value in Info.plist without any detection process. It determines HIDSubinterfaceID value.

Is that something that could be fixed with EFI string injection or something like that?
At least that would be a useful interim solution...

I read below sites. There are some start point for recognizing keyboard layout automatically.
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-12.html#kcf2
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html#keyboardid

Of course, if that would actually be implemented, it would be ideal...

Thanks for the answers!