Two physical keyboards on Mac

You might create remappings using keyremap4macbook. It's a bit tricky to write your own mapping, but it allows to have rules that mappings are only active for specific devices.