Keyboard events are only "heard" by the Node that has keyboard focus - so you would need some way for your Group/Line to have keyboard focus. Try registering a mouse handler with the line which requests keyboard focus when the user clicks on the line.