Description
how do I even begin to implement some sort of autocomplete at the input cursor by using up and down arrow keys ?
I suppose this will be a nice feature for text-io that others are interested in.
Say I have List<String> names = Arrays.asList("albert", "alice", "ava", "betty", "cathy");
So when asked about inputting a name, at the input prompt, if I type in the first letter as "a", (but before typing in the second letter), and I hit the up arrow key, I would like the word "albert" to pop up at the input prompt.
I suppose I'll need to write my own methods to implement the nitty gritty.
Can someone show me first on how to capture the input before hitting enter ?
How do I make use of the up and down arrow keys. Is it by registering handlers and how ?
Thanks!