I own a MacBook Pro with a German keyboard layout but bought a UK external keyboard because the special characters are much more convenient for coding and LaTeX.

Currently, I have to manually switch between UK and GER keyboard layouts in the menu bar, when I am switching between the internal and external keyboard.

Is there a way to make MacOS always recognise the internal keyboard as German and the external always as UK-layout?

  • Not sure if you can set default input sources for specific keyboards, but you could use the standard keyboard shortcut Control+Space to switch between different language input sources quickly.
    – AVelj
    Commented Nov 18, 2020 at 10:16
  • @AVelj thanks. Didn't know about this! Wish apple had done this slightly more elegant but this is sufficient! Commented Nov 18, 2020 at 17:09
  • It’s been a keyboard shortcut for as long as I’ve had a Mac (about 15-16 years). I’m sure someone else may assist with some way of recognising different keyboards, but I can’t speak to that.
    – AVelj
    Commented Nov 19, 2020 at 3:09

1 Answer 1


See this discussion: https://superuser.com/a/1150616.

Direct link for a utility repo: https://github.com/ohueter/autokbisw

  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – Thinkr
    Commented Apr 19, 2023 at 17:07

You must log in to answer this question.

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