You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

`hidutil` stopped working on macOS 14.2

I've got the following command to run on every macOS start:


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


It always rebinds a key on my international Apple Magic Keyboard to a convenient one to match with my us keyboard laptop.


Right after 14.2 install this command stopped working. It throws no error, the


hidutil property --get UserKeyMapping


prints out some kind a valid output as follow, but the key behaviour isn't updates after the command run as it appears before update. Also I'm not sure that in the past the --get argument output was printed out as a Decimal rather than hex. But this is as it is now.


The command output:


(
        {
        HIDKeyboardModifierMappingDst = 30064771125;
        HIDKeyboardModifierMappingSrc = 30064771172;
    }
)

MacBook Pro (M1, 2020)

Posted on Dec 12, 2023 4:21 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 18, 2023 1:33 AM

UserKeyMapping with hidutil is no longer working for me after upgrading to 14.2. I'm on a restrict macOS where it's not allowed to install third-party software.


I need to map these keys § <=>`, and ± <=> ~ which swap some special keys from Norwegian keyboard layout to US keyboard layout. Even I did change the layout to US in Keyboard settings but it didn't help for those keys. hidutil was really helpful to map them. Now, it's gone. This impacts my daily work's speed.


UserKeyMapping:(
        {
        HIDKeyboardModifierMappingDst = 30064771172;
        HIDKeyboardModifierMappingSrc = 30064771125;
    },
        {
        HIDKeyboardModifierMappingDst = 30064771125;
        HIDKeyboardModifierMappingSrc = 30064771172;
    }
)
50 replies

Apr 3, 2024 10:16 PM in response to zfigz

For a long overdue reply, I have tried your solution but I could not seem to get it to work. Since I've last tried there have been some updates. I'm now on 14.4.1.


My workaround for the moment is to execute this on startup:


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


It's probably a fault on my end I guess. If the command above is working, I must assume it can be automated with the plist file, I just did not find the right syntax. I tried your solution zfigz with the ProductID / VendorID and also tried with sudo. It did not work. From the general tone here it seems it's working for other people.


I will try again and report back.

`hidutil` stopped working on macOS 14.2

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.