overdue-scratch

Author Topic: [05/11/09] I want some testing on updated VoodooPS2Keyboard  (Read 40694 times)

0 Members and 1 Guest are viewing this topic.

trip2me

  • Observer
  • Posts: 21
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #15 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.
« Last Edit: May 18, 2009, 06:01:29 AM by trip2me »
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

pmcnano

  • Entrant
  • Posts: 2
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #16 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

bcc9

  • Observer
  • Posts: 13
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #17 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.

bcc9

  • Observer
  • Posts: 13
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #18 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

BladeRunner

  • Member
  • Posts: 88
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #19 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.

« Last Edit: July 18, 2009, 09:11:54 PM by BladeRunner »
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

BladeRunner

  • Member
  • Posts: 88
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #20 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.
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

youminbuluo

  • Entrant
  • Posts: 6
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #21 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^_^

yushir0

  • Entrant
  • Posts: 6
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #22 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).

« Last Edit: August 17, 2009, 10:18:37 PM by yushir0 »

simargl

  • Entrant
  • Posts: 5
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #23 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!

Egle

  • Entrant
  • Posts: 2
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #24 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 !!!!!!!

JrCs

  • VoodooLabs
  • Posts: 49
Re: [05/11/09] I want some testing on updated VoodooPS2Keyboard
« Reply #25 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.