From 8be3e37d89a8a756534518173dca2137d91aba68 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 12 Oct 2023 11:45:49 +0100 Subject: [PATCH] Allow F3 with modifier keys See https://github.com/Textualize/textual/issues/3440#issuecomment-1759245890 for some background context. --- src/textual/_ansi_sequences.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/textual/_ansi_sequences.py b/src/textual/_ansi_sequences.py index 9d0c4a601b..ac8b94f2ee 100644 --- a/src/textual/_ansi_sequences.py +++ b/src/textual/_ansi_sequences.py @@ -98,7 +98,9 @@ # Xterm "\x1b[1;2P": (Keys.F13,), "\x1b[1;2Q": (Keys.F14,), - # '\x1b[1;2R': Keys.F15, # Conflicts with CPR response. + "\x1b[1;2R": ( + Keys.F15, + ), # Conflicts with CPR response; enabled after https://github.com/Textualize/textual/issues/3440. "\x1b[1;2S": (Keys.F16,), "\x1b[15;2~": (Keys.F17,), "\x1b[17;2~": (Keys.F18,), @@ -112,7 +114,9 @@ # Control + function keys. "\x1b[1;5P": (Keys.ControlF1,), "\x1b[1;5Q": (Keys.ControlF2,), - # "\x1b[1;5R": Keys.ControlF3, # Conflicts with CPR response. + "\x1b[1;5R": ( + Keys.ControlF3, + ), # Conflicts with CPR response; enabled after https://github.com/Textualize/textual/issues/3440. "\x1b[1;5S": (Keys.ControlF4,), "\x1b[15;5~": (Keys.ControlF5,), "\x1b[17;5~": (Keys.ControlF6,), @@ -124,7 +128,9 @@ "\x1b[24;5~": (Keys.ControlF12,), "\x1b[1;6P": (Keys.ControlF13,), "\x1b[1;6Q": (Keys.ControlF14,), - # "\x1b[1;6R": Keys.ControlF15, # Conflicts with CPR response. + "\x1b[1;6R": ( + Keys.ControlF15, + ), # Conflicts with CPR response; enabled after https://github.com/Textualize/textual/issues/3440. "\x1b[1;6S": (Keys.ControlF16,), "\x1b[15;6~": (Keys.ControlF17,), "\x1b[17;6~": (Keys.ControlF18,),