Copy my script disable-internal-when-external-connected.js to some place you like.Install node js >= 4.x (directly or nvm or whatever).Setup Node.js script to automatically disable internal keyboard when external keyboard connected and vice versa Make sure all devices are set with ignore: true so it this configuration is not activated by default.Replace the devices section by your current devices you got above in Step 1.Use my karabiner.json in this project, it contains all the rules to Disable all Keyboard buttons.
Replacing my karabiner.json in this project with yours
Notes: You can easily find these when connected both keyboards, set some settings in Karabiner-Elements then they will show up in ~/.karabiner.d/configuration/karabiner.json through vices. So I did a hack to make this happen again so I can keep placing my favourite Filco Minila Air on the Apple Internal Keyboard again. But now Karabiner is no longer working with MacOS Serria so the author Tekezo is remaking it as Karabiner-Elements, this developing Karabiner-Elements have not included the mentioned feature above yet, but it allows you to modify it karabiner.json configuration in order to map keys of any keyboards. Previously, Karabiner has the feature to automatically disable the internal keyboard when your external keyboard connected so you can easily put it on the top of your internal keyboard without worrying about the key conflicting.
TURN OFF KARABINER ELEMENTS HOW TO
How to Disable Internal Keyboard when placing External Keyboard on top in Karabiner-Elements and MacOS Serria Why do we need this?