Cocoa grabs control+function key presses so use dedicated cmd based shortcuts for those on macOS

This commit is contained in:
Kovid Goyal 2021-06-13 18:20:14 +05:30
parent b9d52dfaf7
commit c7b91e5f19
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 16 additions and 3 deletions

View File

@ -22,7 +22,7 @@ If applicable, add screenshots to help explain your problem.
**Environment details**
```
Press Ctrl+Shift+F6 in kitty, to copy debug output about kitty and its
Press Ctrl+Shift+F6 (cmd+option+, on macOS) in kitty, to copy debug output about kitty and its
configuration to the clipboard and paste it here.
On older versions of kitty, run kitty --debug-config instead

View File

@ -116,8 +116,8 @@ Toggle maximized :sc:`toggle_maximized`
Input unicode character :sc:`input_unicode_character` (also :kbd:`^+⌘+space` on macOS)
Click URL using the keyboard :sc:`open_url`
Reset the terminal :sc:`reset_terminal`
Reload :file:`kitty.conf` :sc:`reload_config_file`
Debug :file:`kitty.conf` :sc:`debug_config`
Reload :file:`kitty.conf` :sc:`reload_config_file` (also :kbd:`^+⌘+f5` on macOS)
Debug :file:`kitty.conf` :sc:`debug_config` (also :kbd:`⌘+option+f6` on macOS)
Pass current selection to program :sc:`pass_selection_to_program`
Edit |kitty| config file :sc:`edit_config_file`
Open a |kitty| shell :sc:`kitty_shell`

View File

@ -3329,6 +3329,11 @@ the new conf settings *replace* the old ones.
'''
)
map('Reload kitty.conf',
'reload_config_file cmd+control+, load_config_file',
only='macos'
)
map('Debug kitty configuration',
'debug_config kitty_mod+f6 debug_config',
long_text='''
@ -3337,6 +3342,12 @@ its host environment. Useful for debugging issues.
'''
)
map('Debug kitty configuration',
'debug_config cmd+option+, debug_config',
only='macos'
)
map('Send arbitrary text on key presses',
'send_text ctrl+shift+alt+h send_text all Hello World',
add_to_default=False,

View File

@ -848,6 +848,8 @@ if is_macos:
defaults.map.append(KeyDefinition(False, KeyAction('kitten', ('unicode_input',)), 12, False, 32, ()))
defaults.map.append(KeyDefinition(False, KeyAction('edit_config_file'), 8, False, 44, ()))
defaults.map.append(KeyDefinition(False, KeyAction('clear_terminal', ('reset', True)), 10, False, 114, ()))
defaults.map.append(KeyDefinition(False, KeyAction('load_config_file'), 12, False, 44, ()))
defaults.map.append(KeyDefinition(False, KeyAction('debug_config'), 10, False, 44, ()))
defaults.mouse_map = [
# click_url_or_select
MouseMapping(0, 0, -2, False, KeyAction('mouse_click_url_or_select')),