Turns out my coworker had the same issue. With his permission here's the solution that worked right away:
First run this and scroll to the information about the keyboard
Run cat /proc/bus/input/devices | less
I: Bus=0005 Vendor=004c Product=026c Version=0160
N: Name="Magic Keyboard with Numeric Keypad"
P: Phys=44:e5:17:96:76:24
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0/bluetooth/hci0/hci0:256/0005:004C:026C.0007/input/input38
U: Uniq=c4:14:11:03:c2:de
H: Handlers=sysrq kbd event20 leds
B: PROP=0
B: EV=120013
B: KEY=10000 0 0 1 1007b00001007 ff9f207ac14057ff ffbeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f
Now construct an id via this way:
evdev:input:b<bus_id>v<vendor_id>p<product_id>e<version_id>-<modalias>
Where version and modalies don't matter. I get this:
evdev:input:b0005v004Cp026C*
Next create this file
etc/udev/hwdb.d/60-applekeyboard.hwdb
I don't think the name matters but I am not sure.
The file should contain the ID we just made and the remap of keys:
# Apple magic
evdev:input:b0005v004Cp026C*
KEYBOARD_KEY_700e2=leftmeta
KEYBOARD_KEY_700e3=leftalt
How do you find the names? just execute sudo evtest
find your keyboard and press the key you want to chage.. Output looks like this:
Event: time 1644400418.762658, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e3
Event: time 1644400418.762658, type 1 (EV_KEY), code 56 (KEY_LEFTMETA), value 1
Use that output to construct the desired key and change.
Next, sudo run these commands to update:
systemd-hwdb update
udevadm control --reload-rules
udevadm trigger
Then you are done.