Commit 305731ca authored by Philipp Hörist's avatar Philipp Hörist

ChatControlBase: Fix scroll hotkey infinite recursion

Handling of SHIFT + PAGE_UP/PAGE_DOWN was missing in the
ConversationTextview key press handler
parent 028a2abf
Pipeline #6773 failed with stages
in 3 minutes and 27 seconds
......@@ -269,6 +269,10 @@ def __init__(self, parent_win, widget_name, contact, acct,
def _on_conv_textview_key_press_event(self, textview, event):
if event.get_state() & Gdk.ModifierType.SHIFT_MASK:
if event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up):
if event.keyval in COPY_MODIFIER_KEYS:
# Don’t route modifier keys for copy action to the Message Input
# otherwise pressing CTRL/META + c (the next event after that)
......@@ -844,20 +848,20 @@ def _on_message_textview_key_press_event(self, textview, event):
if self._type.is_groupchat:
if event.keyval not in (Gdk.KEY_ISO_Left_Tab, Gdk.KEY_Tab):
self.last_key_tabs = False
if event.get_state() & Gdk.ModifierType.SHIFT_MASK:
if event.get_state() & Gdk.ModifierType.CONTROL_MASK and \
event.keyval == Gdk.KEY_ISO_Left_Tab:
return True
# SHIFT + PAGE_[UP|DOWN]: send to conv_textview
if event.keyval == Gdk.KEY_Page_Down or \
event.keyval == Gdk.KEY_Page_Up:
if event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up):
self._on_scroll(None, event.keyval)
return True
if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
if event.keyval == Gdk.KEY_Tab: # CTRL + TAB
if event.keyval == Gdk.KEY_Tab:
return True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment