7

I oft have to use a Windows keyboard with my Macbook. I have two different profiles in Karabiner, but I don't want to have to keep switching between them.

How can I have different profiles apply to different keyboards in Karabiner or using some other key remapping system?

Note: If this is technically difficult, perhaps because applications might not be able to distinguish which keyboard sent a particular keystroke, a solution that worked based on detecting if an external monitor is plugged in (using an AppleScript that interacted with Karabiner, maybe) would also be acceptable.

2
  • Doesn't Karabiner have a way to do this in a private.xml, where you can have settings apply only to a certain device? groups.google.com/forum/#!topic/osx-karabiner/LmA5Pk7_-j8 Commented Aug 14, 2015 at 22:19
  • @TomGewecke Thanks! I see that it is well documented and had already been asked elsewhere. Hopefully someone else with Google-fu as bad as mine might at least find this question (and so find this question useful). Do you want to post your comment as an answer? Commented Aug 14, 2015 at 22:28

2 Answers 2

7

If you only want to disable key-mapping for the internal keyboard for Apple keyboards, the GUI offers a simpler way that doesn't involve reimporting your profile and editing private.xml:

Internal External

4
  • Umm.. what am I seeing in this response? It's a semi-nsfw anime drawing and unavailable image chosen as a correct answer.
    – Arda
    Commented Sep 6, 2017 at 22:01
  • 2
    @Arda A web filter may be interfering with your access to Imgur websites (I’ve encountered this exact issue in the past). Try using a VPN and reloading. Commented Sep 8, 2017 at 10:29
  • thanks! Indeed, that was the issue (Actually a userscript issue on my end, which thinks i.stack.imgur links are i.imgur ) . Anyways, your solution helped me. Thanks!
    – Arda
    Commented Sep 10, 2017 at 0:07
  • Karabiner no longer works on recent MacOS versions (everything since Sierra I think?). Do you know how to do this in Karabiner-Elements?
    – rlpowell
    Commented Dec 15, 2018 at 6:06
2

You can export the relevant settings from both profiles as XML, place them in private.xml, and then customize them by adding the appropriate tags as described here (found through this Google Groups discussion):

You can define settings which are effective on specific [sic] device only.
Add <device_only> or <device_not> to your <item>.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .