private void registerInputListeners() {
		NodeEvents.addKeyPressHandler(flow, ops.keyListener());
		NodeEvents.addMousePressHandler(flow, e -> {
			if (!e.isPrimaryButtonDown())
				return;
			int currentOffset = ops.navigation().selectionOffset();
			for (HexRow cell : flow.visibleCells()) {
				Bounds bounds = cell.getNode().getBoundsInParent();
				if (bounds.contains(e.getX(), e.getY())) {
					int offset = cell.pickOffsetAtPosition(e.getX(), e.getY());
					if (offset >= 0) {
						if (currentOffset == offset) {
							ops.engageCurrent();
						} else {
							ops.navigation().select(offset);
						}
					}
				}
			}

			// Do not propagate the event up the scene graph.
			e.consume();
		});
		NodeEvents.addMouseReleaseHandler(flow, e -> {
			// If we've not gotten focus grab it and consume the event so that it does not propagate up the scene graph.
			if (!flow.isFocusWithin()) {
				e.consume();
				flow.requestFocus();
			}
		});
	}
Hex editor control.

@author Matt Coley
recaf-ui/src/main/java/software/coley/recaf/ui/pane/editing/hex/HexEditor.java