How do I keep the following KeyEvent Filter from adding multiple "SPACE" characters vs just a single character?
I'm aware that ControlsFX AutoComplete will allow for SPACE in an editable JavaFX ComboBox, but it does not for an un-editable ComboBoxes -- at least that I have found so far. The AutoComplete I'm using works with both an editable and un-editable ComboBox, however, code below will multiply a single "SPACE" bar key press times the number of characters typed - regardless of backing them out or not. For example, if you were to type "s" then space, this code will add a single space character after "s" (i.e. "s "). If you were to type "sat", a single "SPACE" will be added 3 times. And if you backspace and type pen, it will add 6 spaces for a single spacebar key press (e.g. sat + pen).
I feel I'm on the right path but may be using the wrong key event handler per se and maybe on the wrong object (e.g. ComboBox, Skin, etc)... not sure exactly.