Added support for HOME and END keys.