Thanks. I broke down and rebooted before reading this, so everything is back to normal. If it only happens rarely I guess it isn't a big deal.
My keyboard didn't seem to be doing anything. I did try restarting the x-server (but it's possible I did it with ctrl-alt-delete instead of ctrl-alt-backspace), and alt-tab wouldn't switch windows like it normally does. I logged in remotely to try to kill the process, but top didn't list afni or anything that looked afni-related, so I couldn't get a process ID.
I'm running RHEL.