How do I remap WASD to arrow keys? 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
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: