diff --git a/gen-key-constants.py b/gen-key-constants.py index 2ab1ef526..2c8a5a739 100755 --- a/gen-key-constants.py +++ b/gen-key-constants.py @@ -333,8 +333,8 @@ def generate_functional_table() -> None: text = f'var functional_key_number_to_name_map = map[int]string{serialize_go_dict(code_to_name)}\n' text += f'\nvar csi_number_to_functional_number_map = map[int]int{serialize_go_dict(csi_map)}\n' text += f'\nvar letter_trailer_to_csi_number_map = map[string]int{serialize_go_dict(letter_trailer_codes)}\n' - tt = ', '.join(f'{x}:true' for x in tilde_trailers) - text += f'\nvar tilde_trailers = map[int]bool{{ {tt} }}' + tt = ', '.join(f'{x}: true' for x in tilde_trailers) + text += '\nvar tilde_trailers = map[int]bool{' + f'{tt}' + '}\n' patch_file('tools/tui/loop/key-encoding.go', 'csi mapping', text, start_marker='// ', end_marker='') diff --git a/tools/tui/loop/key-encoding.go b/tools/tui/loop/key-encoding.go index 02a7b2045..7169e13cb 100644 --- a/tools/tui/loop/key-encoding.go +++ b/tools/tui/loop/key-encoding.go @@ -18,7 +18,8 @@ var csi_number_to_functional_number_map = map[int]int{2: 57348, 3: 57349, 5: 573 var letter_trailer_to_csi_number_map = map[string]int{"A": 57352, "B": 57353, "C": 57351, "D": 57350, "E": 57427, "F": 8, "H": 7, "P": 11, "Q": 12, "S": 14} -var tilde_trailers = map[int]bool{ 57348:true, 57349:true, 57354:true, 57355:true, 57366:true, 57368:true, 57369:true, 57370:true, 57371:true, 57372:true, 57373:true, 57374:true, 57375:true } +var tilde_trailers = map[int]bool{57348: true, 57349: true, 57354: true, 57355: true, 57366: true, 57368: true, 57369: true, 57370: true, 57371: true, 57372: true, 57373: true, 57374: true, 57375: true} + // end csi mapping // }}}