--- Update ---
Okay, I just found what's causing the problem. The actual program also implements ActionListener and that's stopping the keybind from working. I need the actionlistener for several buttons also in the program so I can't just get rid of it. Is there any way I can have both, or is there something I can replace the actionlistener with instead?
--- Update ---
With a bit of googling, I managed to find a solution. Apparently an action is also an actionlistener, as odd as that seems. So now I just need to make actions for all the buttons in my program, and get rid of all the actionlisteners, but at least it will work.