What’s the better way to use PC Keyboard on macOS?
Tags: macos, keyboard, productivity, hack
Published: 2018-09-23 17:27:10

---
title: What’s the better way to use PC Keyboard on macOS?
published: true
description: A little hack when use windows keyboard on mac
tags: macos, keyboard, productivity, hack
cover_image: https://thepracticaldev.s3.amazonaws.com/i/e3oxjb0lk4m1cn9fl547.png
series: macos-helpful-tips
---

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](https://thepracticaldev.s3.amazonaws.com/i/q691zbez6uugkxmuaia2.jpeg)

> **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](https://thepracticaldev.s3.amazonaws.com/i/52z7ya9xglwdrp7tetpf.jpeg)

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

![Alt PC Keyboard swap](https://thepracticaldev.s3.amazonaws.com/i/m8xeazknd9bj9dafjrkq.jpeg)

# 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](https://thepracticaldev.s3.amazonaws.com/i/xejfrtwa4ulpvaj0zoty.png)

# Alternative

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

<figure>
  {% gist https://gist.github.com/equiman/db927f7277ac347ad38b9264015a4db4 %}<figcaption>[https://pqrs.org/osx/karabiner](https://pqrs.org/osx/karabiner/)</figcaption>
</figure>

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](https://thepracticaldev.s3.amazonaws.com/i/r3owbcltc464husnmu7q.jpg)

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

![Karabiner - Simple Modifications](https://thepracticaldev.s3.amazonaws.com/i/6okgzs9ib13x7mpgr4jo.png)

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](https://thepracticaldev.s3.amazonaws.com/i/8vpuim9zrdlc4lpdzgz6.png)

More complex combinations can be applied from [ke-complex-modifications](https://ke-complex-modifications.pqrs.org/)

# 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](https://thepracticaldev.s3.amazonaws.com/i/t6aswdfj2hir4kp7dle0.png)

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

---

**That's All Folks!**
**Happy Coding** 🖖

[![beer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkgsx4aw6qn9i9ax6as9.png)](https://github.com/sponsors/deinsoftware)