DEV Community

Cover image for What’s the better way to use PC Keyboard on macOS?
Camilo Martinez
Camilo Martinez

Posted on • Updated on

Windows Keyboard on Mac What’s the better way to use PC Keyboard on macOS?

I have been working all my life on PC/Linux, now I’m working with macOS due to Xcode dependency for iPhone compilation.

In the beginning, it’s really hard to switch your mind because the control keys win/alt/ctrl keys are made in different order ctrl/option/command.

I think it’s better to use some systems with his default configuration. I will show you how you can hack your PC keyboard to work as a mac keyboard.

Easy peasy Japanesey

This is mac keyboard distribution (with alt on left):

Alt Mac Keyboard distribution

Caution: Before removing any of the keyboard keys, unplug the keyboard from the computer or turn off the computer. I highly recommend seeing some youtube videos about removing keys or cleaning keyboards.

PC keyboards have an alt key on right. Just remove win and alt keys…

Alt PC Keyboard distribution

… and swap them. Tada!!! … now you have the same physical (and visual) order as mac keyboard.

Alt PC Keyboard swap

Remap Keys

The last step consists of telling macOS, to change this keys behavior.

Go to System Preferences → Keyboard and select and press the [Modifier Keys…] button. Select your PC Keyboard (my wireless Logitech keyboard was identified as “USB receiver”) on the list and switch ⌥ Option to ⌘ Command and ⌘ Command to ⌥ Option press [OK] button and …

Alt Mac Keyboard configuration


A better approach is to use Karabiner: an excellent keyboard customizer.


Because you can modify the behavior on each key, event on the left o right side. And this forgotten Application Key can resurrect as ⌥ Option (or ⌘ Command).

Alt Application Key

Just select on target device PC Keyboard and define these keys change on Simple Modifications tab:

Karabiner - Simple Modifications

Sometimes period key on Numpad writes a comma, that why remapping as the period it's a good choice.

And if you have problems with <> and ºª keys, swap them with non_us_backslash and grave_accent_and_tilde.

Karabiner - Additional Modifications

More complex combinations can be applied from ke-complex-modifications

Bonus Track

One thing that I dislike on MacOS is switch between apps because can't enable an option to switch between windows. The keyboard shortcut to move focus to next window ⌘ +` is hard to access and if your input is focused on a place that can be used to write doesn't work because his priority is writing text in this case: backtick character.

To avoid this annoying behavior, just changed to:

Alt Keyboard Shortcut

Now can switch between apps with ⌘ + ⇥ and between windows on the same app with ⌥ + ⇥

That's All Folks!
Happy Coding 🖖


Top comments (13)

equiman profile image
Camilo Martinez • Edited

That's why I love Dev community. I have tested with Ukelele but it's complicated, now
I know about Karabiner and works like a charm.

Thanks @rhymes and @titonobre !

Post updated with Karabiner configuration.

nssimeonov profile image

Everyone (in EU), who accidentally purchased a Macbook with the obnoxious US-Intl keyboard quickly finds out about Karabiner... at least it took me only 3h to find it and relieve the pain...

It was either this or $1000 to replace the keyboard, trackpad and upper panel (apparently they go together).. that was for the late 2012 model...

douglasdc profile image

I just don`t understand shortcut on macos, in PC (win / linux) they are so much instinctive. Ctrl = command in application scope, Alt = command in System scop. At macos the keys make a mess to do something, combine two keys to do what only two are capible to do on PC.

One month using macos and i don`t make that work well yet.

proscatinatingpro profile image
Trung Ly

Does anyone know how to make this happen but for MacOS layout in Windows without using AutoHotKey? I managed to remapping the Windows and alt keys but still struggling between ctrl and cmd as it is not a to one-on-one relationship.

equiman profile image
Camilo Martinez

Maybe remapping keys with PowerToys.

rodrigofm04 profile image
Rodrigo Figueiredo

I have no doubt you write this post for me!! I have the same keyborad and mac you have; and came from the same PC/linux env kkkk
I would never consider removing the keys like that !!
Thank you dude

equiman profile image
Camilo Martinez

You welcome. There are more like us out there... jajajaja.

Did you know that on login, Bloq Num key can turn on or off the screen?

titonobre profile image

I started to do this with my keyboard but then I switched to Microsoft Sculpt Keyboard which has keys with different shapes.

After this I took some time to map all the necessary keys with Karabiner to the correct layout.
Since I had to rewire the brain to work with the split keyboard I just don't look at the keys.

As a bonus: no more keyboard hijacking from colleagues.

rhymes profile image

Ahahah love the hack. I didn't hack my Microsoft keyboard, just remapped the keys with Karabiner

val_baca profile image
Valentin Baca

This is exactly what I do with my "PC" mechanical keyboard when I use it with my Mac.

I also go super petty and take a Sharpie to the Windows logo on the key.

joshichinmay profile image
Chinmay Joshi


dpinol profile image
Daniel Pinyol

thanks for the article. saved my day!

travelingwilbur profile image
Wilbur Suero

Oh, that's great. I will do this tomorrow.