diff --git a/CHANGELOG.md b/CHANGELOG.md index ba59ae84b..dcacd209e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fixed order styles are applied in DataTable - allows combining of renderable styles and component classes https://github.com/Textualize/textual/pull/2272 +- Fixed key combos with up/down keys in some terminals https://github.com/Textualize/textual/pull/2280 - Fix empty ListView preventing bindings from firing https://github.com/Textualize/textual/pull/2281 - Fix `get_component_styles` returning incorrect values on first call when combined with pseudoclasses https://github.com/Textualize/textual/pull/2304 - Fixed `active_message_pump.get` sometimes resulting in a `LookupError` https://github.com/Textualize/textual/issues/2301 diff --git a/src/textual/_ansi_sequences.py b/src/textual/_ansi_sequences.py index 73d8e8082..fc3b8de62 100644 --- a/src/textual/_ansi_sequences.py +++ b/src/textual/_ansi_sequences.py @@ -210,8 +210,8 @@ ANSI_SEQUENCES_KEYS: Mapping[str, Tuple[Keys, ...]] = { "\x1b[1;3F": (Keys.Escape, Keys.End), "\x1b[1;3H": (Keys.Escape, Keys.Home), # Alt+shift+number. - "\x1b[1;4A": (Keys.Escape, Keys.ShiftDown), - "\x1b[1;4B": (Keys.Escape, Keys.ShiftUp), + "\x1b[1;4A": (Keys.Escape, Keys.ShiftUp), + "\x1b[1;4B": (Keys.Escape, Keys.ShiftDown), "\x1b[1;4C": (Keys.Escape, Keys.ShiftRight), "\x1b[1;4D": (Keys.Escape, Keys.ShiftLeft), "\x1b[1;4F": (Keys.Escape, Keys.ShiftEnd), @@ -240,15 +240,15 @@ ANSI_SEQUENCES_KEYS: Mapping[str, Tuple[Keys, ...]] = { "\x1b[1;6F": (Keys.ControlShiftEnd,), "\x1b[1;6H": (Keys.ControlShiftHome,), # Control + Meta + arrows. - "\x1b[1;7A": (Keys.Escape, Keys.ControlDown), - "\x1b[1;7B": (Keys.Escape, Keys.ControlUp), + "\x1b[1;7A": (Keys.Escape, Keys.ControlUp), + "\x1b[1;7B": (Keys.Escape, Keys.ControlDown), "\x1b[1;7C": (Keys.Escape, Keys.ControlRight), "\x1b[1;7D": (Keys.Escape, Keys.ControlLeft), "\x1b[1;7F": (Keys.Escape, Keys.ControlEnd), "\x1b[1;7H": (Keys.Escape, Keys.ControlHome), # Meta + Shift + arrows. - "\x1b[1;8A": (Keys.Escape, Keys.ControlShiftDown), - "\x1b[1;8B": (Keys.Escape, Keys.ControlShiftUp), + "\x1b[1;8A": (Keys.Escape, Keys.ControlShiftUp), + "\x1b[1;8B": (Keys.Escape, Keys.ControlShiftDown), "\x1b[1;8C": (Keys.Escape, Keys.ControlShiftRight), "\x1b[1;8D": (Keys.Escape, Keys.ControlShiftLeft), "\x1b[1;8F": (Keys.Escape, Keys.ControlShiftEnd),