handleKeyEvent method
Handles a keyboard event, returning true if the event was consumed.
Implementation
@override
bool handleKeyEvent(evt.KeyEvent event) {
if (isLoading || spans == null) return false;
final keyLower = event.key.toLowerCase();
final type = event.type;
if (keyLower == 'q') {
PromptScope.of(context)?.done();
return true;
}
if (keyLower == 't') {
setState(() {
timeDisplayMode =
TimeDisplayMode.values[(timeDisplayMode.index + 1) %
TimeDisplayMode.values.length];
});
return true;
}
if (_handleSelectionBracketKey(event)) return true;
if (_handleModifiedShortcut(event, keyLower)) return true;
if (_handleModeOrOverlayKey(keyLower, type)) return true;
return _handleNavigationOrZoomKey(keyLower, type);
}