Warning and a suggestion
This utility has a few bugs that can randomly cause it stop working under quite a few situations. Someone else has put together a new version of the tool based on the same original source. Although I haven't had a chance to try this other utlity, I recommend you do so! It's bound to be better and less buggy:
DualKeyboard is a small utility to allow the use of modifier keys "across" external keyboards in OS X. This is useful for people who want to use multiple external keyboards in a split-keyboard arrangement, or because they use a foot pedal or other assistive device.
DualKeyboard is not mine. It was written by Chance Miller of http://dotdotcomorg.net/. I have preserved it on GitHub in case his site disappears from the Internet.
To use, simply compile using
Makefile and then run
./alterkeys. You may need to check "Enable access for assistive devices" in the Universal Access preference pane if you haven't done so already.