acpi_ibm(4) provides support for multiple hotkeys on ThinkPad X1 Carbon Gen9, so:
# echo acpi_ibm_load=\"YES\" >> /boot/loader.conf
or it's possible to load that kernel driver on a running system:
# kldload acpi_ibm
Now try to run the following command to see ACPI events:
# cat /var/run/devd.pipe
press brightness up/down keys (those are combined with the F6/F5 keys correspondingly), and see events:
!system=ACPI subsystem=IBM type=\_SB_.PC00.LPCB.EC__.HKEY notify=0x10
!system=ACPI subsystem=IBM type=\_SB_.PC00.LPCB.EC__.HKEY notify=0x11
let's name it x1cg9.conf:
notify 0 {