Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Doesn't work in Mountain Lion? #8

Closed
Leask opened this issue Mar 18, 2012 · 41 comments
Closed

Doesn't work in Mountain Lion? #8

Leask opened this issue Mar 18, 2012 · 41 comments

Comments

@Leask
Copy link

Leask commented Mar 18, 2012

It seems like that, anyway to make it work again?

@tekezo
Copy link
Member

tekezo commented Mar 18, 2012

PCKeyboardHack needs the source code of kernel.
Therefore it doesn't work on OS X 10.8 at the moment.

I'll release PCKeyboardHack for 10.8 after the source code of OS X 10.8 is published.
http://www.opensource.apple.com/

Wait for public release of 10.8.

Takayama Fumihiko tekezo@pqrs.org

On 12/03/18 17:13, Leask wrote:

It seems like that, anyway to make it work again?


Reply to this email directly or view it on GitHub:
#8

@Leask
Copy link
Author

Leask commented Mar 18, 2012

It seems that we have a very long time to wait.

Thanks you all the same.

Yours sincerely,

Leask Huang / 黄思夏 / www.leaskh.com

On Sunday, March 18, 2012 at 9:01 PM, Takayama Fumihiko wrote:

PCKeyboardHack needs the source code of kernel.
Therefore it doesn't work on OS X 10.8 at the moment.

I'll release PCKeyboardHack for 10.8 after the source code of OS X 10.8 is published.
http://www.opensource.apple.com/

Wait for public release of 10.8.

Takayama Fumihiko <tekezo@pqrs.org (mailto:tekezo@pqrs.org)>

On 12/03/18 17:13, Leask wrote:

It seems like that, anyway to make it work again?


Reply to this email directly or view it on GitHub:
#8


Reply to this email directly or view it on GitHub:
#8 (comment)

@macx
Copy link

macx commented Jun 12, 2012

Still no updates?

@johnmcdonnell
Copy link

@macx they won't get the source till 10.8 is released. That may be July, but macrumors.com is your best source for that sort of information.

@miharekar
Copy link

AFAIK the current one is already GM, so it should be ok to start your work :P I can't live without this :)

@peppy
Copy link

peppy commented Jul 7, 2012

The source code is not released. As already mentioned, this will not happen until the public release of the OS.

@olfway
Copy link
Contributor

olfway commented Jul 10, 2012

it seems the only difference between 10.6 and 10.7 kext is:

+#define     kEjectKeyDelayMS        100     // the delay for a dedicated eject key
+#define     kEjectF12DelayMS        250     // the delay for an F12/eject key

@felixbuenemann
Copy link

If you load the 10.7 kext on 10.8 it'll work (only tested caps lock remapping).

@shemerey
Copy link

@fbuenemann could you explain how do this right ? and where i can get kext ?

@Leask
Copy link
Author

Leask commented Jul 12, 2012

How? I need it!

Yours sincerely,

Leask Huang / 黄思夏 / www.leaskh.com

On Thursday, July 12, 2012 at 4:06 PM, Anton Shemerey wrote:

@fbuenemann could you explain how do this right ? and where i can get kext ?


Reply to this email directly or view it on GitHub:
#8 (comment)

@felixbuenemann
Copy link

I extracted PCKeyboardHack.10.7.kext using Pacifist, moved it to /System/Library/Extensions/PCKeyboardHack.kext and loaded it using kexktutil. Make sure it's owned by root:wheel, or loading will fail.

If you don't know how to enter single user to debug problems, you're probably better off waiting for a new release.

@joshskidmore
Copy link

To add to fbuenemann's comment, I was also able to get PCKeyboardHack for 10.7 to work with Mountain Lion by using the 10.7 kext. I'm using a couple remappings and everything seems to work great.

These are the steps I followed to make it work:

  1. Download and Install PCKeyboardHack for 10.7
  2. Restart
  3. Edit (as sudo): /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh (see below)
  4. Restart

I hope this helps!
-Josh

/Library/org.pqrs/PCKeyboardHack/scripts/kext.sh:

#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH

basedir="/Library/org.pqrs/PCKeyboardHack"
kextfile=''
uname=`uname -r`
case "${uname%%.*}" in
    10)
        kextfile="$basedir/PCKeyboardHack.10.6.kext"
        ;;
    11)
        kextfile="$basedir/PCKeyboardHack.10.7.kext"
        ;;
    12)
        kextfile="$basedir/PCKeyboardHack.10.7.kext" # Hack to use 10.7 kext in 10.8
        ;;
esac

if [ "x$kextfile" == 'x' ]; then
    exit 1
fi

if [ "$1" == 'unload' ]; then
    kextunload -b org.pqrs.driver.PCKeyboardHack
else
    kextload "$kextfile"
fi

exit 0

@Leask
Copy link
Author

Leask commented Jul 13, 2012

It works!

Thank you and thank god!

Yours sincerely,

Leask Huang / 黄思夏 / www.leaskh.com

On Friday, July 13, 2012 at 12:46 AM, Josh Skidmore wrote:

To add to fbuenemann's comment, I was also able to get PCKeyboardHack for 10.7 to work with Mountain Lion by using the 10.7 kext. I'm using a couple remappings and everything seems to work great.

These are the steps I followed to make it work:

  1. Download and Install PCKeyboardHack for 10.7
  2. Restart
  3. Edit (as sudo): /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh (see below)
  4. Restart

I hope this helps!
-Josh

/Library/org.pqrs/PCKeyboardHack/scripts/kext.sh:

#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH

basedir="/Library/org.pqrs/PCKeyboardHack"
kextfile=''
uname=`uname -r`
case "${uname%%.*}" in
10)
kextfile="$basedir/PCKeyboardHack.10.6.kext"
;;
11)
kextfile="$basedir/PCKeyboardHack.10.7.kext"
;;
12)
kextfile="$basedir/PCKeyboardHack.10.7.kext" # Hack to use 10.7 kext in 10.8
;;
esac

if [ "x$kextfile" == 'x' ]; then
exit 1
fi

if [ "$1" == 'unload' ]; then
kextunload -b org.pqrs.driver.PCKeyboardHack
else
kextload "$kextfile"
fi

exit 0

Reply to this email directly or view it on GitHub:
#8 (comment)

@cobyism
Copy link

cobyism commented Jul 16, 2012

Thanks @joshskidmoreadding those three lines worked a treat!

(Running 10.8 GM Seed)

@darrencauthon
Copy link

@joshskidmore You are a prince. Back to coding for me!

@agileadam
Copy link

I used the code above from joshskidmore but got a python error while trying to use sudo to update the file.

So, I had to do this:

cd /Library/org.pqrs/PCKeyboardHack/scripts
sudo chown adam:wheel kext.sh
vim kext.sh (edited the file)
sudo chown root:wheel kext.sh

Thanks! Vim-sanity is restored!

@HIRANO-Satoshi
Copy link

I can't live without this as you.

The adding 12) line seems working for me, too.

Though, I understand the author's conservative attitude.

Thanks takezo and folks!!

hirano

@johnlinvc
Copy link

@joshskidmore It works like a charm.

@chrisgeo
Copy link

I'm still trying to figure out why it keeps looking for the 10.6 kext/SDK.

@drsethl
Copy link

drsethl commented Jul 27, 2012

Would someone mind explaining how to edit the file as sudo? Thank you in advance.

@tnorthcutt
Copy link

@drsethl in a terminal window, do sudo vim /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh (replacing vim with your favorite editor).

@vishvananda
Copy link

no luck here. It seems to kill the preferences pane so I can't edit anything

@drsethl
Copy link

drsethl commented Jul 30, 2012

thanks @tnorthcutt. I don’t have an editor installed (unless there's one included with Mountain Lion?). Googled and found MacVim, but don’t know how to use it with Sudo. Any more advice appreciated, thanks for the time.

@tnorthcutt
Copy link

You don't actually need to substitute something for vim - it's included and should work fine. You may need to read up on how to edit a file with it.

@coolaj86
Copy link

https://gist.github.com/3204240

PC Keyboard Hack on OS X 10.8 Mountain Lion

TL;DR

sudo curl \
    -L https://raw.github.com/gist/3204240/ed7e118ca6e50071576bb33be7bab3201dc38d04/kext.sh \
    -o /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh

Instructions

  1. Open Terminal, iTerm, or whatever you use.

  2. Install PCKeyboardHack for OS X 10.7

  3. For safety's sake, inspect the current kext loader

    cat /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh
    
  4. For safety's sake, inspect the updated kext loader https://raw.github.com/gist/3204240/ed7e118ca6e50071576bb33be7bab3201dc38d04/kext.sh

  5. Copy the updated kext loader over the original

    sudo curl \
        -L https://raw.github.com/gist/3204240/ed7e118ca6e50071576bb33be7bab3201dc38d04/kext.sh \
        -o /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh
    
  6. Now verify that the file is what you expect:

    cat /Library/org.pqrs/PCKeyboardHack/scripts/kext.sh
    
  7. REBOOT!

@drsethl
Copy link

drsethl commented Jul 30, 2012

@coolaj86 You are an absolute legend, thank you mate!

@coolaj86
Copy link

@Leask will you please edit your original post to include the solution in my comment #8 (comment) right up at the top where it's easy for people to get at?

@vishvananda
Copy link

ignore my earlier comment. It started working after a couple of reboots. Not sure why the preferences pane was temporarily broken.

@knu
Copy link

knu commented Aug 1, 2012

@benyafai
Copy link

benyafai commented Aug 1, 2012

As knu stated, it is out, will we see an updated version soon?
Thanks!

@tyre
Copy link

tyre commented Aug 2, 2012

This is amazing. Thank you so much!

@ekoger
Copy link

ekoger commented Aug 7, 2012

Worked perfectly. Thank you!

@jimmykl
Copy link

jimmykl commented Aug 8, 2012

@coolaj86 Nice one thank you!

@mindloaf
Copy link

The source code for 10.8 has been published: http://www.opensource.apple.com/release/mac-os-x-108/

@tekezo
Copy link
Member

tekezo commented Aug 11, 2012

I've released PCKeyboardHack for OS X 10.8.
http://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html.en

@tekezo tekezo closed this as completed Aug 11, 2012
@macx
Copy link

macx commented Aug 11, 2012

Thank you tekezo for your support!

@mindloaf
Copy link

I second that--thanks so much for your efforts!

@amaltson
Copy link

Thank you tekezo! Caps Lock = Esc again :)

@grillermo
Copy link

This is broken again for mountain lion 1.8.2, should i open a new issue?
Oh i should mention i'm on a Macbook Pro with retina display.
I think mine is a special case, because it does work with the builtin keyboard, but not with an external one.
Edit:
It was microsoft's software to control the keyboard messing with pckeyboardhack. I uninstalled it and the problem is solved.

@Leask
Copy link
Author

Leask commented Sep 25, 2012

It works great for me currently in the latest os x 10.8.2.

Yours sincerely,

Leask Huang / 黄思夏 / www.leaskh.com

On Tuesday, September 25, 2012 at 4:36 AM, grillermo wrote:

This is broken again for mountain lion 1.8.2, should i open a new issue?


Reply to this email directly or view it on GitHub (#8 (comment)).

@tekezo
Copy link
Member

tekezo commented Sep 25, 2012

KeyRemap4MacBook and PCKeyboardHack grab key events from keyboard driver.
Therefore, they depend the keyboard driver implementation.
It's a essential limitation that KeyRemap4MacBook and PCKeyboardHack might not work on some third vendor drivers such as Microsoft's IntelliType.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests