added END key support to a keyboard logic