private int autoLookupBinary(String text) {

		int index = binarySearch(text);
		int col = lookupColumn;
		if (textMatches(text, index, col)) {
			return index;
		}
		if (index - 1 >= 0) {
			if (textMatches(text, index - 1, col)) {
				return index - 1;
			}
		}
		if (index + 1 < getRowCount()) {
			if (textMatches(text, index + 1, col)) {
				return index + 1;
			}
		}

		return -1;
	}
Clients call this method when the user types keys

@param e the key event
Ghidra/Framework/Docking/src/main/java/docking/widgets/AutoLookup.java