mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Fix a gen-config bug that was causing macos shortcuts to be defined on linux as well
This commit is contained in:
parent
4cff3e51cb
commit
0bade29c25
@ -270,8 +270,9 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]:
|
||||
text = sc.parseable_text
|
||||
if sc.only:
|
||||
only.setdefault(sc.only, []).append((text, func))
|
||||
for val in func(text):
|
||||
a(f' {val!r},')
|
||||
else:
|
||||
for val in func(text):
|
||||
a(f' {val!r},')
|
||||
a(']')
|
||||
if only:
|
||||
imports.add(('kitty.constants', 'is_macos'))
|
||||
|
38
kitty/options/types.py
generated
38
kitty/options/types.py
generated
@ -669,89 +669,54 @@ defaults.kitten_alias = {}
|
||||
defaults.symbol_map = {}
|
||||
defaults.map = [
|
||||
KeyDefinition(False, KeyAction('copy_to_clipboard'), 1024, False, 99, ()),
|
||||
KeyDefinition(False, KeyAction('copy_to_clipboard'), 8, False, 99, ()),
|
||||
KeyDefinition(False, KeyAction('paste_from_clipboard'), 1024, False, 118, ()),
|
||||
KeyDefinition(False, KeyAction('paste_from_clipboard'), 8, False, 118, ()),
|
||||
KeyDefinition(False, KeyAction('paste_from_selection'), 1024, False, 115, ()),
|
||||
KeyDefinition(False, KeyAction('paste_from_selection'), 1, False, 57348, ()),
|
||||
KeyDefinition(False, KeyAction('pass_selection_to_program'), 1024, False, 111, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_up'), 1024, False, 57352, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_up'), 1024, False, 107, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_up'), 10, False, 57354, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_up'), 8, False, 57352, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_down'), 1024, False, 57353, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_down'), 1024, False, 106, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_down'), 10, False, 57355, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_line_down'), 8, False, 57353, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_page_up'), 1024, False, 57354, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_page_up'), 8, False, 57354, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_page_down'), 1024, False, 57355, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_page_down'), 8, False, 57355, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_home'), 1024, False, 57356, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_home'), 8, False, 57356, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_end'), 1024, False, 57357, ()),
|
||||
KeyDefinition(False, KeyAction('scroll_end'), 8, False, 57357, ()),
|
||||
KeyDefinition(False, KeyAction('show_scrollback'), 1024, False, 104, ()),
|
||||
KeyDefinition(False, KeyAction('new_window'), 1024, False, 57345, ()),
|
||||
KeyDefinition(False, KeyAction('new_window'), 8, False, 57345, ()),
|
||||
KeyDefinition(False, KeyAction('new_os_window'), 1024, False, 110, ()),
|
||||
KeyDefinition(False, KeyAction('new_os_window'), 8, False, 110, ()),
|
||||
KeyDefinition(False, KeyAction('close_window'), 1024, False, 119, ()),
|
||||
KeyDefinition(False, KeyAction('close_window'), 9, False, 100, ()),
|
||||
KeyDefinition(False, KeyAction('next_window'), 1024, False, 93, ()),
|
||||
KeyDefinition(False, KeyAction('previous_window'), 1024, False, 91, ()),
|
||||
KeyDefinition(False, KeyAction('move_window_forward'), 1024, False, 102, ()),
|
||||
KeyDefinition(False, KeyAction('move_window_backward'), 1024, False, 98, ()),
|
||||
KeyDefinition(False, KeyAction('move_window_to_top'), 1024, False, 96, ()),
|
||||
KeyDefinition(False, KeyAction('start_resizing_window'), 1024, False, 114, ()),
|
||||
KeyDefinition(False, KeyAction('start_resizing_window'), 8, False, 114, ()),
|
||||
KeyDefinition(False, KeyAction('first_window'), 1024, False, 49, ()),
|
||||
KeyDefinition(False, KeyAction('first_window'), 8, False, 49, ()),
|
||||
KeyDefinition(False, KeyAction('second_window'), 1024, False, 50, ()),
|
||||
KeyDefinition(False, KeyAction('second_window'), 8, False, 50, ()),
|
||||
KeyDefinition(False, KeyAction('third_window'), 1024, False, 51, ()),
|
||||
KeyDefinition(False, KeyAction('third_window'), 8, False, 51, ()),
|
||||
KeyDefinition(False, KeyAction('fourth_window'), 1024, False, 52, ()),
|
||||
KeyDefinition(False, KeyAction('fourth_window'), 8, False, 52, ()),
|
||||
KeyDefinition(False, KeyAction('fifth_window'), 1024, False, 53, ()),
|
||||
KeyDefinition(False, KeyAction('fifth_window'), 8, False, 53, ()),
|
||||
KeyDefinition(False, KeyAction('sixth_window'), 1024, False, 54, ()),
|
||||
KeyDefinition(False, KeyAction('sixth_window'), 8, False, 54, ()),
|
||||
KeyDefinition(False, KeyAction('seventh_window'), 1024, False, 55, ()),
|
||||
KeyDefinition(False, KeyAction('seventh_window'), 8, False, 55, ()),
|
||||
KeyDefinition(False, KeyAction('eighth_window'), 1024, False, 56, ()),
|
||||
KeyDefinition(False, KeyAction('eighth_window'), 8, False, 56, ()),
|
||||
KeyDefinition(False, KeyAction('ninth_window'), 1024, False, 57, ()),
|
||||
KeyDefinition(False, KeyAction('ninth_window'), 8, False, 57, ()),
|
||||
KeyDefinition(False, KeyAction('tenth_window'), 1024, False, 48, ()),
|
||||
KeyDefinition(False, KeyAction('next_tab'), 1024, False, 57351, ()),
|
||||
KeyDefinition(False, KeyAction('next_tab'), 9, False, 93, ()),
|
||||
KeyDefinition(False, KeyAction('next_tab'), 4, False, 57346, ()),
|
||||
KeyDefinition(False, KeyAction('previous_tab'), 1024, False, 57350, ()),
|
||||
KeyDefinition(False, KeyAction('previous_tab'), 9, False, 91, ()),
|
||||
KeyDefinition(False, KeyAction('previous_tab'), 5, False, 57346, ()),
|
||||
KeyDefinition(False, KeyAction('new_tab'), 1024, False, 116, ()),
|
||||
KeyDefinition(False, KeyAction('new_tab'), 8, False, 116, ()),
|
||||
KeyDefinition(False, KeyAction('close_tab'), 1024, False, 113, ()),
|
||||
KeyDefinition(False, KeyAction('close_tab'), 8, False, 119, ()),
|
||||
KeyDefinition(False, KeyAction('close_os_window'), 9, False, 119, ()),
|
||||
KeyDefinition(False, KeyAction('move_tab_forward'), 1024, False, 46, ()),
|
||||
KeyDefinition(False, KeyAction('move_tab_backward'), 1024, False, 44, ()),
|
||||
KeyDefinition(False, KeyAction('set_tab_title'), 1026, False, 116, ()),
|
||||
KeyDefinition(False, KeyAction('set_tab_title'), 9, False, 105, ()),
|
||||
KeyDefinition(False, KeyAction('next_layout'), 1024, False, 108, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 1024, False, 61, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 1024, False, 43, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 1024, False, 57413, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 8, False, 43, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 8, False, 61, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '+', 2.0)), 9, False, 61, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '-', 2.0)), 1024, False, 45, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '-', 2.0)), 1024, False, 57412, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '-', 2.0)), 8, False, 45, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, '-', 2.0)), 9, False, 45, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, None, 0.0)), 1024, False, 57347, ()),
|
||||
KeyDefinition(False, KeyAction('change_font_size', (True, None, 0.0)), 8, False, 48, ()),
|
||||
KeyDefinition(False, KeyAction('kitten', ('hints',)), 1024, False, 101, ()),
|
||||
KeyDefinition(True, KeyAction('kitten', ('hints', '--type path --program -')), 1024, False, 112, (SingleKey(mods=0, is_native=False, key=102),)),
|
||||
KeyDefinition(True, KeyAction('kitten', ('hints', '--type path')), 1024, False, 112, (SingleKey(mods=1, is_native=False, key=102),)),
|
||||
@ -763,16 +728,13 @@ defaults.map = [
|
||||
KeyDefinition(False, KeyAction('toggle_fullscreen'), 1024, False, 57374, ()),
|
||||
KeyDefinition(False, KeyAction('toggle_maximized'), 1024, False, 57373, ()),
|
||||
KeyDefinition(False, KeyAction('kitten', ('unicode_input',)), 1024, False, 117, ()),
|
||||
KeyDefinition(False, KeyAction('kitten', ('unicode_input',)), 12, False, 32, ()),
|
||||
KeyDefinition(False, KeyAction('edit_config_file'), 1024, False, 57365, ()),
|
||||
KeyDefinition(False, KeyAction('edit_config_file'), 8, False, 44, ()),
|
||||
KeyDefinition(False, KeyAction('kitty_shell', ('window',)), 1024, False, 57344, ()),
|
||||
KeyDefinition(True, KeyAction('set_background_opacity', ('+0.1',)), 1024, False, 97, (SingleKey(mods=0, is_native=False, key=109),)),
|
||||
KeyDefinition(True, KeyAction('set_background_opacity', ('-0.1',)), 1024, False, 97, (SingleKey(mods=0, is_native=False, key=108),)),
|
||||
KeyDefinition(True, KeyAction('set_background_opacity', ('1',)), 1024, False, 97, (SingleKey(mods=0, is_native=False, key=49),)),
|
||||
KeyDefinition(True, KeyAction('set_background_opacity', ('default',)), 1024, False, 97, (SingleKey(mods=0, is_native=False, key=100),)),
|
||||
KeyDefinition(False, KeyAction('clear_terminal', ('reset', True)), 1024, False, 57349, ()),
|
||||
KeyDefinition(False, KeyAction('clear_terminal', ('reset', True)), 10, False, 114, ()),
|
||||
]
|
||||
if is_macos:
|
||||
defaults.map.append(KeyDefinition(False, KeyAction('copy_to_clipboard'), 8, False, 99, ()))
|
||||
|
Loading…
Reference in New Issue
Block a user