multi_trigger_autocomplete
multi_trigger_autocomplete copied to clipboard
prevent default keyboard event on the desktop platform
Is your feature request related to a problem? Please describe. I hope to be able to use the tab, up and down arrow keys, and other keys to select options. For TextField, the default key events need to be blocked.
Describe the solution you'd like prevent default key event like tab, up and down arrows key .
Hey @DogeVenci, can you explain a bit more on the prevent them on desktop?
@xsahil03x I am currently using RawKeyboardListener to customize shortcuts.
RawKeyboardListener(
focusNode: FocusNode(onKey: (node, event) {
// The process of handling key events.
return (
event.logicalKey == LogicalKeyboardKey.arrowUp ||
event.logicalKey == LogicalKeyboardKey.arrowDown ||
event.logicalKey == LogicalKeyboardKey.tab
)
? KeyEventResult.handled
: KeyEventResult.ignored;
}),
child: TextField()
...
)
My suggestion is to add an onKey method on MultiTriggerAutocomplete to customize the processing of keys event
@DogeVenci thanks, I will try to work on this sometime next week.
@xsahil03x Hey Sahil, do you still have any plans of adding keyboard navigation? I've been trying to do it by myself to then open a PR but it's way too different of how the default Autocomplete widget works. Great job on the plugin!
@gildaswise i do have the plans but I'm a bit busy with the work.