Code Review Videos > How I Fixed > Can I use PC keyboard and mouse on Mac?

Can I use PC keyboard and mouse on Mac?

Yes.

You absolutely can use a PC keyboard and a PC mouse on a Mac.

With some caveats.

I’m writing this post as I have work client right now that enforces use of their corporate Macbook Pro laptop. They provide the laptop, but won’t give me a Mac keyboard or mouse.

Fortunately I have some old hardware from a previous PC in the form of a Filco Majestouch 2 Ninja keyboard, and a Logitech G502 corded mouse.

As a side note I like the Filco keyboards, and am using a Majestouch 2 to type this. I’m just not a fan of the Ninja keys, as we will see in a moment.

My keyboard mappings using a PC keyboard on a Mac

The whole point of this post is because I wanted to copy my keyboard mappings / bindings from my work Macbook to my personal Macbook.

On the work laptop I use a piece of software called Karabiner-Elements to setup my keyboard mappings from my regular Windows / PC keyboard, over to my Mac.

There’s an absolute ton of possibilities when using Karabiner, and I don’t really do much to scratch the surface. Less is more, I guess. And these work for me.

OK, so here goes:

My keyboard mappings using a PC keyboard on a Mac

🥷🥷🥷 So this is a good point to flag up why I don’t like the Ninja keycaps. See how the letters / text is printed on the side of the key cap? Meh. That is one of them things I immediately regretted after buying the keyboard. It’s really hard to use in the low light, because no matter how good a touch typist you are, sometimes looking at the keys is useful for other reasons. 🥷🥷🥷

All style, no substance.

Anyway, what does this all mean?

Well, I have remapped:

  • PC keyboard “Left Alt” to Mac “Left Option”
  • PC keyboard “Left Super” / “Left Option” to Mac “Left Command”

Pretty simple bindings really, though it feels a bit back to front. You are free to map however you like.

But how?

Well, with Karabiner as mentioned.

my karabiner keyboard setup on osx

Once you have Karabiner installed, it should detect your keyboard / mouse and allow you to set up bindings for that specific keyboard.

Note how I have my USB Keyboard selected, and then the ‘simple modifications’ applied only to that keyboard.

With this setup, for example to copy / paste some text I would have to press alt + c, then alt + v on the Mac. It does feel odd, at first. But as I say I am now used to it.

I rarely use the Command / Super key, maybe only for using the hashtag or pound sign symbol. Far less frequently than the Option key.

How do you see what key is being pressed on a Mac?

Depending on the complexity of your keyboard remapping needs, it can be useful to see exactly what key you are currently pressing down.

This way is not perfect, but it may help:

osx key codes app

I found this app (above) called Key Codes.

It’s free.

And it works pretty much as you’d expect. You open the app, press a key, and it tells you what key you just pressed.

You can then go into Karabiner and use that info to create a new keyboard remapping:

osx keyboard mapping with karabiner and key codes

Mouse Setup

Beyond plugging the mouse in, it mostly just worked.

I set the scroll direction to ‘natural’, because any other way is unnatural.

osx scroll direction natural

This next step is only for if you have a Logitech mouse.

The only thing I did do was install the Logitech G-Hub software as the various available sensitivities weren’t suitable for me. I found the G-Hub software allowed me to dial in the precise sensitivity I prefer.

Then yesterday my brother tried my mouse and thought I’d lost the plot. To each their own.

And that’s it really. That’s my OSX keyboard and mouse setup when using PC peripherals.

Edit: This isn’t quite true. I also customised the scroll wheel such that pressing the scroll button left or right is equivalent to swiping left and ride on the track pad. In other words, it allows me to easily move between desktops. This is actually really easy to set up, once you know how. It involves creating a couple of macros:

logitech g502 osx mouse setup

On the screen above I click ‘Create new macro‘ then enter a name when prompted. I called mine “screen left” and “screen right”. Original.

Then select ‘No repeat‘:

logitech g502 osx mouse setup macros

At this point I was going to write out all the steps, but frankly it’s easier to see in a gif:

setting up a macro on a logitech mouse on osx

Easy, right?

I will say it’s remarkably cheaper – and comes with less clutter – than buying the pricey Mac keyboard and mouse combo.

Also without the additional software I really struggled to get the setup working as I wanted it. It may be possible, but for the sake of a couple of downloads, I didn’t see the point of wasting any further time.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.