function handleKeypress(e) {
		if (e.key !== "Enter") return;

		e.preventDefault();
		e.stopPropagation();
		const activeHint = $ul.get(".active");
		if (!activeHint) return;
		const value = activeHint.getAttribute("value");
		if (onSelect) onSelect(value);
		else $input.value = value;
	}
Handle keypress event
@param {KeyboardEvent} e Event