Implemented mouse press event handling