Put mouse to sleep

I’m trying to create a UI for the main menu that can use mouse or arrow buttons to select the new, load, option buttons etc.

Both are working fine, however I want to disable the mouse once a key is pushed, and remain disabled until it is moved again. Currently if the mouse is over a button and I push the down key, the option will not be able to change as the mouse is still hovering over the first option

Is there a way to put the mouse “to sleep” once these buttons are pushed, and then wake when it is moved again?

Well the simple way would be to have a boolean that keep track of when or not the mouse should be used. Then put a
if(!mouseEnabled){
//Your mouse react to button code here.
}

So that your buttons do not react to your mice.