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):
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…
… and swap them. Tada!!! … now you have the same physical (and visual) order as mac keyboard.
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 …
Alternative
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
).
Just select on target device PC Keyboard and define these keys change on Simple Modifications
tab:
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
.
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:
Now can switch between apps with ⌘ + ⇥
and between windows on the same app with ⌥ + ⇥
That's All Folks!
Happy Coding 🖖
Top comments (13)
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.
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...
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.
Does anyone know how to make this happen but for MacOS layout in Windows without using AutoHotKey? I managed to remapping the
Windows
andalt
keys but still struggling betweenctrl
andcmd
as it is not a to one-on-one relationship.Maybe remapping keys with PowerToys.
LOL
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
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?
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.
Ahahah love the hack. I didn't hack my Microsoft keyboard, just remapped the keys with Karabiner
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.
DAYUM.
BRILLIANT.
Hi,
thanks for the article. saved my day!
Oh, that's great. I will do this tomorrow.