Hi pulse99,
welcome to the Apple (user-to-user) Community.
Re: "I have a bluetooth keyboard attached to my Macbook Pro. It works for typing this message in the dialog box on here...my built-in keyboard also works on here, and everywhere else. But neither keyboard works in Pages. This is a recent development."
Am no expert in this area, yet your post to the community deserves some response, if only to get a discussion underway. As both keyboards work just fine everywhere else, seems that rules out accidental setting changes.
If you haven't already, you could try updating your Mac to the newest MacOS version :
(NB: Please remember it is always wise to back-up Mac data first .)
What's new in the updates for macOS Sequoia - Apple Support
Eg: says:macOS Sequoia 15.5
"This update includes enhancements, bug fixes, and security updates for your Mac".
________________
If already updated: Try re-starting your Mac : Apple menu > Restart
(ie: deletes temporary files, re-establishes connections, may update recent setting changes, and often restores order if something is not working as expected.)
If you haven't : You could also try quitting, and re-opening Pages app
_____________________
If you have VPN installed: May be a cause of interference : Try turning it off ... check if keyboard(s) work now.
All the best :-)