well I am pretty sure that already someone asked (may be was me) how is possible to disable a key listener like this:
B4X:
Sub AddKeyPressedListener
Dim r As Reflector
r.Target = B4XPages.GetNativeParent(Me).RootPane
r.AddEventFilter("KeyPressed", "javafx.scene.input.KeyEvent.ANY")
End Sub
When you no longer want an event filter to process events for a node or for an event type, remove the filter using the removeEventFilter() method. This method takes the event type and the filter as arguments. In Example 3-2, the filter defined in Example 3-1 is removed from the MouseEvent.MOUSE_PRESSED event for myNode1. The filter is still executed by myNode2 and by myNode1 for the KeyEvent.KEY_PRESSED event.
Example 3-2 Remove a Filter
// Remove an event filter
myNode1.removeEventFilter(MouseEvent.MOUSE_PRESSED, filter);