Dealing with spaces in selectmenu options

Dealing with spaces in selectmenu options

I'm using a selectmenu to let people pick an item from a long list of options whose values can include spaces. They should be able to start typing a value and have the selectmenu automatically highlight the first matching option. So far so good - that is the standard behaviour. But when typing the name of an option with a space, the space is interpreted as a keyboard interaction to select the currently highlighted option.

Consider the standard examples here:


If you invoke the list and start typing 'some other file...' you can only get to the first space and the 'some unknown file' option is selected. 

My list contains scientific names of animal or plants, e.g. Canis lupus, and there can be many different species with the same genus (i.e. first part - 'Canis' from the example I gave), so it's really important to be able to use spaces in the options.

Any ideas on how to alter the default keyboard interactions so that spaces are interpreted like any alphanumeric?

Rich