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

Camilo Martinez - Sep 23 '18 - - Dev Community

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

Alternative

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



[https://pqrs.org/osx/karabiner](https://pqrs.org/osx/karabiner/)

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 🖖

beer

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player