keyboard functionality implemented