register function enter button