Implemented keyboard thread callback mechanism