Skip to content

Instantly share code, notes, and snippets.

@nezticle
Last active July 7, 2026 11:21
Show Gist options
  • Select an option

  • Save nezticle/871091a41ce322e81be947d83a5e4a86 to your computer and use it in GitHub Desktop.

Select an option

Save nezticle/871091a41ce322e81be947d83a5e4a86 to your computer and use it in GitHub Desktop.
How to get Tilde (~) to work correctly in macOS

This is to solve an issue where you use a non-apple european keyboard with the US keyboard layout in macOS where the Tilde key is in the wrong place.

This is the process for the Logitec MX Keys Mini

  • Connect the keyboard (bluetooth)
  • Make sure the keyboard is in PC mode (hold fn + p for 3 seconds)
  • Go through the keyboard wizard and at the end select the European ISO... layout
  • Switch the keyboard to Mac mode (hold fn + o for 3 seconds)
  • Tilde should work

If this doesn't work:

  • delete /Library/Preferences/com.apple.keyboardtype.plist
  • reboot
  • try above again
@unickq

unickq commented Sep 6, 2022

Copy link
Copy Markdown

great. thank you very much :)

@nick-winchmore

Copy link
Copy Markdown

Thanks - the only place I could find an answer to this.

@mic4ael

mic4ael commented Jul 27, 2023

Copy link
Copy Markdown

Not sure why but it works!

@guspix

guspix commented Jan 12, 2024

Copy link
Copy Markdown

For future reference: I tried this, but when I did the fn + o to go back it wouldn't go back, so I was stuck with the PC mode. I fixed it by completely forgetting the keyboard from my bluetooth preferences and pairing it again. After doing this I got the Mac mode back, and the tilde key was now working, so this did work!

@bfmatei

bfmatei commented Feb 26, 2024

Copy link
Copy Markdown

Hint: if you have Logi Options+ installed, you need to go to the keyboard settings and uncheck “Always keep keyboard in Mac layout” in order to be able to switch between PC mode and Mac mode. In won’t work otherwise.

@lupuohaufe

lupuohaufe commented Feb 28, 2024

Copy link
Copy Markdown

what do you mean by "Go through the keyboard wizard and at the end select the European ISO... layout"? I can't find anything like that in System Settings -> Keyboard. Or in the Logi Option+ app

@nezticle

nezticle commented Mar 2, 2024

Copy link
Copy Markdown
Author

I had to do this again with the MX Keys S Plus today, and the same instructions worked out fine. It's like the Nordic keys one which I use in US layout. When I went through the Wizard it wasn't recognized as European ISO, but it was the only one with ISO in the name. "~" worked fine once I switched it back to Mac mode.

I mentioned the Wizard, because when it seems when you connect these Logitech keyboards to macOS by adding them as a Bluetooth device, they always bring up a keyboard Wizard (says something about not being able to identifiy which layout the keyboard is in etc).

Also I guess I should mention that I've never actually tried to buy the "Mac version" of these keyboards even though I see that is an option. Things might just work then, but these are the Cross-platform editions I've tested with where you have both key's printed on the actual keyboard.

@whydrae

whydrae commented Mar 15, 2024

Copy link
Copy Markdown

Maybe someone finds it helpful, but I couldn't get used to the fact, that tilde was on the right to the Shift key, but I get used that it's above the Tab. To swap them, hold "fn+U" for around 3 seconds and it will be changed. I found it somewhere over Reddit, but no docs to this behaviour attached.

@lupuohaufe

Copy link
Copy Markdown

@whydrae yessir! that did the job. thank you very much!

@estabij

estabij commented Jun 27, 2024

Copy link
Copy Markdown

@whydrae yes that worked, fn + u. Thanks a lot!

@0wlyW00d

Copy link
Copy Markdown

Thanks @whydrae, save my day ! 

@bettodiaz

Copy link
Copy Markdown

Thanks a lot! It worked!

@dshmatok

dshmatok commented Jun 3, 2025

Copy link
Copy Markdown

Maybe someone finds it helpful, but I couldn't get used to the fact, that tilde was on the right to the Shift key, but I get used that it's above the Tab. To swap them, hold "fn+U" for around 3 seconds and it will be changed. I found it somewhere over Reddit, but no docs to this behaviour attached.

@whydrae thank you! Your advice helped me with the keyboard Logitech ERGO K860 for macOS Sequoia 15.5!

@leehyeonbeen

leehyeonbeen commented Jun 16, 2025

Copy link
Copy Markdown

Thank you so much for this. In my case:

  1. sudo rm -rf /Library/Preferences/com.apple.keyboardtype.plist
  2. reboot

worked out. Using Logitech MX Keys Mini, M1 Max MBP16 on macOS Sequoia 15.5

@recon08

recon08 commented Oct 29, 2025

Copy link
Copy Markdown

I think it is doable without rebooting

fn+P

terminal

sudo rm /Library/Preferences/com.apple.keyboardtype.plist
open /System/Library/CoreServices/KeyboardSetupAssistant.app

select iso
finish setup
fn+O

@codelixir

Copy link
Copy Markdown

Didn't work without rebooting unfortunately, but the reboot did it for me, thanks !

@gosha212

Copy link
Copy Markdown

@whydrae yes that worked, fn + u. Thanks a lot!

You've saved my life!

@cassiohalmeida

Copy link
Copy Markdown

sudo rm /Library/Preferences/com.apple.keyboardtype.plist did the trick with my Keychron Q1 Max. Thank you!

@yapy28

yapy28 commented Jul 7, 2026

Copy link
Copy Markdown

Maybe someone finds it helpful, but I couldn't get used to the fact, that tilde was on the right to the Shift key, but I get used that it's above the Tab. To swap them, hold "fn+U" for around 3 seconds and it will be changed. I found it somewhere over Reddit, but no docs to this behaviour attached.

OMG! THANK YOU SO MUCH!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment