1

OK so, I saw this answer on another thread about how to remap keys:

Apple's Technical Note TN2450 describes how to remap keys. Running the following command will remap Right Alt to be Right Control.

hidutil property --set '{"UserKeyMapping":
    [{"HIDKeyboardModifierMappingSrc":0x7000000e6,
      "HIDKeyboardModifierMappingDst":0x7000000e4}]
}'

So I wrote this:

hidutil property --set '{"UserKeyMapping":
    [{"HIDKeyboardModifierMappingSrc":0x700000052,
      "HIDKeyboardModifierMappingDst":0x70000001A}
      "HIDKeyboardModifierMappingSrc":0x700000051,
      "HIDKeyboardModifierMappingDst":0x700000016}
      "HIDKeyboardModifierMappingSrc":0x700000050,
      "HIDKeyboardModifierMappingDst":0x700000004}
      "HIDKeyboardModifierMappingSrc":0x70000004F,
      "HIDKeyboardModifierMappingDst":0x700000007}]
}'

But when I run it I get this error:

2020-02-17 11:47:40.303 hidutil[2619:57497] NSJSONSerialization Error Domain=NSCocoaErrorDomain Code=3840 

"Badly formed array around character 127." 

UserInfo={NSDebugDescription=Badly formed array around character 127.}

ERROR!!!! Unable to create property object for 
'{"UserKeyMapping":
    [{"HIDKeyboardModifierMappingSrc":0x700000052,
      "HIDKeyboardModifierMappingDst":0x70000001A}
      "HIDKeyboardModifierMappingSrc":0x700000051,
      "HIDKeyboardModifierMappingDst":0x700000016}
      "HIDKeyboardModifierMappingSrc":0x700000050,
      "HIDKeyboardModifierMappingDst":0x700000004}
      "HIDKeyboardModifierMappingSrc":0x70000004F,
      "HIDKeyboardModifierMappingDst":0x700000007}]
}'

What's the problem?

(I'm a total noob just trying to remap a key for a game (EU:4), I'm not an expert programmer or anything, so please be gentle and explain things in layman's terms for my noob ass to understand! xD)

Thanks, R69NiX

3
  • 1
    Try mapping them one at a time. Also, I believe array elements are separated by semicolons (;)
    – Allan
    Feb 17, 2020 at 13:21
  • Ahhh thanks. Remapping one at a time like the the answer on the other thread seems to work fine. Thanks Allan :)
    – R69NiX
    Feb 17, 2020 at 18:22
  • Type it up as an answer and accept it. I'll up vote so you can get the reputation points.
    – Allan
    Feb 17, 2020 at 19:01

1 Answer 1

1

As you are not a programmer and want a very simple way, then I recommend using Karabiner to remap keys.

A powerful and stable keyboard customizer for OS X.

This page will give you step by step guidelines. You can achieve your setup as per my following screenshot:

enter image description here

2
  • 1
    Ohh that looks easy to use. I tried a program called FastFox and didn't have a clue how to use it lol think I'll try that. Thank you Udhy :)
    – R69NiX
    Feb 17, 2020 at 18:24
  • @R69NiX: Indeed, it is very easy and convenient too.
    – Udhy
    Feb 18, 2020 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .