I'm using onWheelCapture to detect the scroll offset from the top. As I'm using onWheelCapture, it only detects the movement when the user scrolls up or down. I would like to detect the scroll offset when the user presses the key-down or space key. So I tried to use onKeyDownCapture in order to listen to when using the keyboard but it doesn't work. I also tried it with onKeyPressCapture but it doesn't work either. This was checked using the console, it only prints the distance from the top when scrolling.
<React.Fragment>
<main className={classes.Content}
onWheelCapture={props.onScrollMethod} //This one works
onKeyPressCapture={props.onScrollMethod} //This one doesn't work
onKeyDownCapture={props.onScrollMethod} > //This one doesn't work either
<div className={classes.ContentWrapper}>
{props.children}
</div>
</main>
</React.Fragment>
Am I missing something? Thank you in advance for your time and help!