Modified keybinding code. Introduced mouse click event handling