Skip to content

Commit

Permalink
Changes for handling Shortcuts with traitlets in consoleWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Sep 9, 2024
1 parent fce7517 commit 52ea153
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qtconsole/console_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def is_whitespace(char):
# Classes
#-----------------------------------------------------------------------------
class ShortcutManager(HasTraits):
# Definimos traits para los shortcuts
# Define traits for shortcuts
shortcut_print = Unicode('Ctrl+P').tag(config=True)
shortcut_select_all = Unicode('Ctrl+A').tag(config=True)
shortcut_cut = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Cut).toString()).tag(config=True)
shortcut_copy = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Copy).toString()).tag(config=True)
shortcut_paste = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Paste).toString()).tag(config=True)
#shortcut_cut = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Cut).toString()).tag(config=True)
#shortcut_copy = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Copy).toString()).tag(config=True)
#shortcut_paste = Unicode(QtGui.QKeySequence(QtGui.QKeySequence.Paste).toString()).tag(config=True)

@observe('shortcut_print', 'shortcut_select_all','shortcut_cut','shortcut_copy','shortcut_paste')
def _on_shortcut_changed(self, change):
Expand Down

0 comments on commit 52ea153

Please sign in to comment.