'How to select keyframe in tool mode?

Is there anyway to select keyframes in tool mode like we do with mouse?
I have a lot of key frames and need to automate the selection process

Unselected:
enter image description here

Selected with mouse:
enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source