Wed 13th Feb 2008
DoubleCommand and multiple keyboards
Posted in the evening, filed under MacBook Pro.I love my MacBook Pro. But not everything about her.
For instance, I despise that there is no forward delete key on the inbuilt keyboard. But using DoubleCommand you can fix that. You can also make the fn key act like control (I’m always hitting fn-C instead of Ctrl-C to kill a thread, for instance), and a whole lot of other changes.
But if you remap the small enter key to forward delete (which I highly recommend), if you plug in a USB keyboard, then the keypad’s enter key will also be mapped to forward delete. Which is not cool.
The latest SVN version of DoubleCommand has the facility to fix this, but it requires a bit of terminal work to set it up.
If you haven’t got a newish version (~1.6.6), first, check out the latest code:
$ svn co https://doublecommand.svn.sourceforge.net/svnroot/doublecommand doublecommand
The code we want is in trunk/kext. Open the project inside that folder. Build the project, and then enter the following command from inside of the build/ subdirectory:
$ sudo cp -r Default/DoubleCommand.kext /Library/StartupItems/DoubleCommand/DoubleCommand.kext
Enter your password when requested. Then change to the DoubleCommand installation directory:
$ cd /Library/StartupItems/DoubleCommand
We need to unload and then load the kext. The easiest way is using the following commands ($ means type it in, > is the output):
$ sudo ./DoubleCommand stop> Unloading DoubleCommand> kextunload: unload kext ./DoubleCommand.kext succeeded$ sudo ./DoubleCommand> Loading DoubleCommand> kextload: ./DoubleCommand.kext loaded successfully> dc.config: 0 -> 1593344
Take a note of that last number, and then perform the two commands:
$ sudo sysctl -w dc.keyboard1=37$ sudo sysctl -w dc.config1=<the_number_above>
Now, load up the DoubleCommand preferences pane, and disable the ‘Enter key acts as forward delete‘, or whatever you had it acting as. Now, the two keyboards will appear differently in behaviour. And hopefully your life will be fuller.
Many thanks to the developer, Michael Baltaks, for his quick response and assistance in this matter.
Don’t forget to save the settings as System and User!
5 days, 1 hour after the fact.
Not sure if your issue is that you can’t press a single key to forward-delete on your MacBook Pro or if you would settle for a key combination. Because on my MacBook Pro a simple Fn-delete key combo works to forward delete. Along those lines, option-Fn-delete will delete the next word in front of the cursor.
Of course, if you have Fn mapped as something else, then I guess this wouldn’t work.
Hope that helps.
1 week, 4 days after the fact.
Yup, I have fn mapped to Ctrl, since I always hit that by mistake when attempting to press Ctrl-C or Ctrl-A.
1 week, 4 days after the fact.
Oddly, I was troubleshooting why DC wasn’t loaded while this comment was added.
I’ve grabbed and built the latest SVN version, which apparently fixes the problems of it not loading on boot.
1 week, 4 days after the fact.
Any idea how to map the control key to fn?
5 months after the fact.
Dunno. I go the other way.
And the fn still does the functions associated with the Fkeys, like brightness, volume, etc. The only reason to use fn other than for this, might be to use the numpad, which I don’t use on the laptop.
5 months after the fact.