caching elem label and len outside func onKeyDown