Updated code for registering key binding