DEV Community

Cover image for Magic Keyboard => remap JKIL to arrows for Mac and PC
Andrew Elans
Andrew Elans

Posted on • Updated on

Magic Keyboard => remap JKIL to arrows for Mac and PC

As a developer, I really like the ergonomics and feel of Magic Keyboard combined with the 10 finger typing method. Before MacBook, I used Magic Keyboard with Numeric Keypad paired with a Windows laptop, where I swapped left ⌘command with ⌃control for a Mac-like copypasting.

My current setup includes a company provided Windows laptop and a MacBook Pro M1 with Microsoft Remote Desktop client (RD) connecting to the corporate Windows workspace.

When I started to use two different systems, I faced the following challenges.

Challenge 1

Since Mac's keyboard lacks the numeric pad and especially delete home|end page up|down keys which I was heavily dependant on, my typing productivity on Mac suffered a lot compared to using the full-scale keyboard.

The solution here could be to use the full-scale Magic Keyboard with Mac, but I didn't want to go this way.

Challenge 2

Both modifier keys and keyboard shortcuts on Mac and Windows are quite different. This challenge escalates with the use of RD which provides limited coverage of Mac's shortcuts (copypaste, undo, find and select all).

Here, without remapping of the keyboard keys to some sort of unified layout, productivity and speed will always suffer.

Challenge 3

keys are naturally placed aside from the letter keys. With the touch typing, index fingers sit on F and J keys, and each time you need to move a cursor, you move your hand to reach the arrows keys or mouse or trackpad (alternatively with a thumb) and then back to J.

Again, with the full-scale keyboard, muscle memory was doing it great, but Mac's little arrow keys proved to be a challenge.

How I solved all these challenges

  1. I replaced external full-scale Magic Keyboard with a shorter version that is exactly the same as Mac's built-in keyboard. This one is used at work with the Windows laptop.

  2. I use Mac's built-in Magic Keyboard.

  3. JKIL are mapped as . Right ⌘command is remapped to ⌃control, and to use JKIL as arrows, right thumb shall press and hold the new ⌃control. To enable basic document shortcuts, some other changes are also done in addition (ref. cover image on top). Left ⌘command is remapped to ⌃control on Windows only.

  4. Karabiner-Elements is installed on Mac to cover both Mac and RD, each having own remapping scope.

  5. AutoHotKey (AHK) is installed on the Windows laptop. PowerTools was tried first, but it had some inconsistencies and therefore replaced with AHK. Swap of 3 keys with registry is required in addition.

Result

I have now a seamless experience with Magic Keyboard on both macOS and Windows as if I work on one system.

All the details are to be provided in a future post...

Top comments (0)