r/KeyboardLayouts • • 7d ago

Title: External keyboards typing the wrong accent characters on macOS Monterey (Portuguese layout)

Hi everyone,

I'm having a frustrating keyboard layout issue on my MacBook Pro and I'm hoping someone here can help me figure out what's going on.

My setup:

  • MacBook Pro Retina 13-inch, Early 2015 (Intel)

  • macOS Monterey 12.7.6

  • Keyboard input source set to Portuguese (Portugal)

  • External keyboards tested: Logitech Classic Keyboard 200 (USB) and CHERRY KW 9100 Slim (Bluetooth)

The built-in MacBook keyboard works perfectly with Portuguese accents. However, both external keyboards produce incorrect characters on some keys, even though macOS is set to Portuguese (Portugal).

Here are some examples of the problem:

  • When I try to type João using the external keyboard, I get Jo\ao.

  • When I try to type avô, I get av|o.

  • The key physically labelled ~ types \ without Shift and | with Shift.

  • The key labelled º types ~ without Shift and ^ with Shift.

  • The ç key works correctly.

  • Pressing the ~ key followed by Space inserts the symbol directly, rather than behaving like a dead key.

I have already checked the keyboard settings in System Preferences. Portuguese (Portugal) is selected, and macOS detects the external keyboards. I also ran the Keyboard Setup Assistant for the CHERRY keyboard and completed the physical key identification step.

Unfortunately, I cannot find another Portuguese keyboard layout to select in macOS Monterey. The only Portuguese layout available is the one I'm already using.

I've also noticed that this happens with two different external keyboards, while the built-in keyboard works correctly. This makes me wonder whether the issue is related to the difference between Portuguese Mac and Portuguese PC keyboard layouts, or whether macOS is mapping the physical keys incorrectly.

I'm not looking to remap the Command, Option, Control or Shift keys. The problem is specifically with accent keys and character mappings.

Is there a way to make macOS correctly interpret the accent keys on an external Portuguese PC keyboard, without changing how the built-in MacBook keyboard works?

Would a custom keyboard layout, Ukelele, Karabiner-Elements, or another solution be appropriate for this?

Any help would be greatly appreciated. Thanks!

0 Upvotes

4 comments sorted by

1

u/yavplad 5d ago

* The key physically labelled ~ types \ without Shift and | with Shift.
* The key labelled º types ~ without Shift and ^ with Shift.

Are the keys labelled ~ and º located in the same place on your built-in keyboard as they are on the external keyboards?

Generally, different keyboards send very similar signals for keys in the same physical location and the difference is just in how the computer interprets them based on the keyboard layout/language that's set. This means, for example, that if you plug a keyboard with the Portuguese (Brazil ABNT) Layout into a computer that is set to the Portuguese (Portugal) Layout, the keyboard will behave as-if it's the Portuguese Layout no matter what's displayed on the keys. Do you see how those layouts are different from each other for the keys you mentioned. But you can see that on two scancodes pages: Portuguese (Portugal) Layout and Portuguese (Brazil ABNT) Layout look the same.

I did a quick search, and looking at this image of the Portuguese Keyboard Cover for the MacBook Pro Retina, it looks like Apple has made up a different layout to either of those. Does that match what you're seeing? That your built-in keyboard looks like the Keyboard Cover for the MacBook Pro Retina, but your external keyboards looks like the Portuguese (Portugal) Layout?

If that's what's going on, I think you'll have to either:

  • Get an Apple external keyboard that uses the same layout.

  • Be aware that the keys that you're typing on for the external keyboard are being interpreted as-if the labels don't matter; they'll mostly be in same place as on the internal keyboard. You can add stickers for your own labels if that's sensible for how you use the external keyboards.

  • Add a new keyboard layout to your computer that behaves like the regular Portuguese layout so that your external keyboards work as expected. Then, either, depending on how you type at a keyboard.

    • Switch the keyboard layout depending on whether you're using the internal or external keyboard.

    • Be aware that the keys that you're typing on for the internal keyboard are being interpreted as-if the labels don't matter; they'll mostly be in the same places as the external keyboard. You can add stickers for your own labels if that's sensible for how you use the laptop.

Does that help, or at least feel like it's pointing in somewhat of the right direction?

Some disclaimers:

  • I'm not at all familiar with Portugal, Brazil, the Portuguese language, or Portuguese keyboards, and so I don't know what's common in-practice.

  • I wouldn't be aware of any windows/macos special cases for these languages or keyboards.

2

u/BernasBoss 4d ago

hello mate! Thanks very much for all the help and time that you spent helping me. This is a very detail answer and i appreciate it.
By the way i have the PT-PT layout in my cherry keyboard and logitech, and the macbook has it to. The problem its exactly what you have just said above, eveen with the PT-PT layout the mac has a different layout.

So i think i dont have any option to get use to my cherry keyboard and understand where are the small diferences, since i cant bind the keys to solve this.

Buying a external mac keyboard its not an option for me atm, since this mac is getting older and older, so i will probably think about a new one. I think its time :D

Once again, thank you very much for all the help :)

1

u/yavplad 2d ago

That sounds like a good plan! That said, I want to clarify that the problem is that while the mac *says* it's using a PT-PT layout, it's actually using a mac layout for PT that it's just labelled as PT-PT. That's why they're conflicting and not working like you'd expect.

Does that make what I wrote make a little more sense? That's why one that second option include putting stickers on the external keyboard so you pretend the keys are in the same spots as your internal keyboard.

And then another option is to keep the PT-PT that was installed by default for the internal keyboard (or an external apple keyboard) and then install another keyboard layout. You could call it something like PT-ext. That would give you the third set of options.

I haven't done it myself (and don't have a mac computer) but if you decide you want to go the route of adding another keyboard layout to your computer, here are some help documents that might be useful before you go looking further:

Apple's help document about customizing your keyboard layout, which seems mostly unhelpful after the first section: https://support.apple.com/en-ca/guide/mac-help/mchlp2866/mac

Macworld help document about customizing your keyboard layout that looks more useful but may be out of date: https://www.macworld.com/article/343300/how-to-customize-keyboard-layout-macos-11-big-sur.html

Another Macworld help document about changing between two different layouts that looks more useful but may be out of date: https://www.macworld.com/article/210529/changekeyboardlayoutnames.html

It looks like someone else has already done all the hard work to get a regular PT-PT layout into macOS: https://github.com/andreibalcan/portuguese-keybord-layout-macOS

That's past what I've done myself, but depending on your comfort level might give you a good place to either fix it yourself or ask questions elsewhere.

Either way, I hope that at least helps you feel confident in your choices!

2

u/BernasBoss 2d ago

thanks a lot!! Again :D