Please review this support page - in particular the section entitled "Adjust trackpad settings and keyboard brightness":
https://support.apple.com/108762
Key Details for Adjusting Backlight:
- Automatic Behavior: The backlight is designed to turn on in dim environments and off in bright ones.
- Manual Control: If the automatic setting isn't sufficient, you can manually adjust it in Settings > General > Keyboard > Hardware Keyboard.
- Troubleshooting: If the backlight is not working, ensure the Magic Keyboard is securely attached to the iPad. If the slider is inactive, the room might be too bright, or you may need to cover the light sensor near the front camera to force it on.
- Compatibility: Most, but not all, Magic Keyboards for iPad Pro and Air models include backlighting.
If you are unable to resolve the problem, you would be best advised to seek assistance directly from Apple Support. You can contact the Support Team using the Support link at top-right or bottom-left of this page.
Alternatively you can initiate and manage your support cases from Apple devices using the excellent Apple Support App. If not already installed, the App can be downloaded from the App Store:
https://apps.apple.com/app/apple-support/id1130498044