diff --git a/khal/ui/editor.py b/khal/ui/editor.py index 82a9220ed..50195be2a 100644 --- a/khal/ui/editor.py +++ b/khal/ui/editor.py @@ -610,10 +610,11 @@ def keypress(self, size: Tuple[int], key: str) -> Optional[str]: return None else: self._abort_confirmed = False + return_value = super().keypress(size, key) if key in self.pane._conf['keybindings']['save']: self.save(None) return None - return super().keypress(size, key) + return return_value WEEKDAYS = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] # TODO use locale and respect weekdaystart diff --git a/khal/ui/widgets.py b/khal/ui/widgets.py index d2f6e8cca..7f6ca6e47 100644 --- a/khal/ui/widgets.py +++ b/khal/ui/widgets.py @@ -138,7 +138,8 @@ def keypress(self, size, key): return None if ( - key in ['up', 'down', 'tab', 'shift tab', 'page up', 'page down'] or + key in ['up', 'down', 'tab', 'shift tab', + 'page up', 'page down', 'meta enter'] or (key in ['right'] and self.edit_pos >= len(self.edit_text)) or (key in ['left'] and self.edit_pos == 0)): # when leaving the current Widget we check if currently @@ -436,7 +437,8 @@ def edit_text(self): def keypress(self, size, key): if ( - key in ['up', 'down', 'tab', 'shift tab', 'page up', 'page down'] or + key in ['up', 'down', 'tab', 'shift tab', + 'page up', 'page down', 'meta enter'] or (key in ['right'] and self.edit_pos >= len(self.edit_text)) or (key in ['left'] and self.edit_pos == 0)): if not self._validate():