Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Feb 4, 2022
1 parent b5676a5 commit 9ab2a38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kitty/window.py
Expand Up @@ -1168,15 +1168,15 @@ def encoded_key(self, key_event: KeyEvent) -> bytes:
cursor_key_mode=self.screen.cursor_key_mode,
).encode('ascii')

@ac('cp', 'Copy the selected text from the active window to the clipboard, if no selection, send Ctrl-C')
@ac('cp', 'Copy the selected text from the active window to the clipboard, if no selection, send SIGINT (aka :kbd:`ctrl+c`)')
def copy_or_interrupt(self) -> None:
text = self.text_for_selection()
if text:
set_clipboard_string(text)
else:
self.write_to_child(self.encoded_key(KeyEvent(key=ord('c'), mods=GLFW_MOD_CONTROL)))

@ac('cp', 'Copy the selected text from the active window to the clipboard and clear selection, if no selection, send Ctrl-C')
@ac('cp', 'Copy the selected text from the active window to the clipboard and clear selection, if no selection, send SIGINT (aka :kbd:`ctrl+c`)')
def copy_and_clear_or_interrupt(self) -> None:
self.copy_or_interrupt()
self.screen.clear_selection()
Expand Down

0 comments on commit 9ab2a38

Please sign in to comment.