'Flutter - Trigger button press for focused element with keyboard key (not Enter)

Does Flutter's focus system have a way to "select" an element on key press, or trigger the element's onPress function? I've figured out a way to re-purpose a keyboard's keys to change focus to the next/previous focusable widget FocusScope.of(context).previousFocus(), but I'm not sure how to then select that focused element by pressing a key other than enter.

I assume there's a way to do it because when you press the "enter" key it will select that element. So what underlying function or operations are being performed when you select enter and can those be changed to happen when pressing another key?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source