Better focus handling and reaction on carriage return