Registers the given callback in the EscapeListenerContext, manages updating the registry when the value of
either callback or isEnabled changes, and removes the callback from the context on unmount.
Parameters
callback: ()=>void
A function to call when the Escape key is pressed.
Registers the given
callbackin theEscapeListenerContext, manages updating the registry when the value of eithercallbackorisEnabledchanges, and removes thecallbackfrom the context on unmount.