Skip to content

autocomplete using up and down arrow key  #17

Closed
@mokun

Description

@mokun

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions