If the timer is being called but the key isn't then most likely you haven't added the listener as a KeyListener. That very much looks like what is happening in your code as you put a timer on it but then do nothing else with it.
In general it would be better practice to split them anyway though. Each Java class should try and focus on doing one thing and doing it well.