From aa4caf78578e69021070dbedeab697e4175e5ccd Mon Sep 17 00:00:00 2001 From: darrenburns Date: Fri, 27 May 2022 16:23:01 +0100 Subject: [PATCH] Swap ControlShiftUp & ControlShiftDown escape codes. Fix sandbox example. (#549) --- sandbox/file_search.py | 2 +- src/textual/_ansi_sequences.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sandbox/file_search.py b/sandbox/file_search.py index 62b4fa85d..7a8cb9b4a 100644 --- a/sandbox/file_search.py +++ b/sandbox/file_search.py @@ -38,7 +38,7 @@ class FileTable(Widget): def get_content_height(self, container: Size, viewport: Size, width: int) -> int: return len(self.filtered_files) - def render(self, style: Style) -> RenderableType: + def render(self) -> RenderableType: grid = Table.grid() grid.add_column() for file in self.filtered_files: diff --git a/src/textual/_ansi_sequences.py b/src/textual/_ansi_sequences.py index 61614ca65..8681115e5 100644 --- a/src/textual/_ansi_sequences.py +++ b/src/textual/_ansi_sequences.py @@ -230,8 +230,8 @@ ANSI_SEQUENCES_KEYS: Mapping[str, Tuple[Keys, ...]] = { "\x1bOc": (Keys.ControlRight,), # rxvt "\x1bOd": (Keys.ControlLeft,), # rxvt # Control + shift + arrows. - "\x1b[1;6A": (Keys.ControlShiftDown,), - "\x1b[1;6B": (Keys.ControlShiftUp,), + "\x1b[1;6A": (Keys.ControlShiftUp,), + "\x1b[1;6B": (Keys.ControlShiftDown,), "\x1b[1;6C": (Keys.ControlShiftRight,), "\x1b[1;6D": (Keys.ControlShiftLeft,), "\x1b[1;6F": (Keys.ControlShiftEnd,),