Notification keybindings added for the list and for last notification. Also bound flat review copy and append to clipboard as well as the show contents window. Fixed bug with using shift along with the cthulhu modifier in keybinding assignments.

This commit is contained in:
Storm Dragon
2026-01-02 08:58:21 -05:00
parent 733f5eee69
commit 5b446000b8
8 changed files with 45 additions and 38 deletions
+11 -11
View File
@@ -3776,6 +3776,17 @@
<property name="position">8</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="aiTabLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">AI Assistant</property>
</object>
<packing>
<property name="position">8</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="ocrGrid">
<property name="visible">True</property>
@@ -3951,17 +3962,6 @@
<property name="position">9</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="aiTabLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">AI Assistant</property>
</object>
<packing>
<property name="position">8</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="ocrTabLabel">
<property name="visible">True</property>
+17
View File
@@ -3088,9 +3088,26 @@ class CthulhuSetupGUI(cthulhu_gtkbuilder.GtkBuilderWrapper):
input_event_manager.get_manager().unmap_all_modifiers()
except Exception:
pass
self._unmapCthulhuModifiersForCapture()
editable.connect('key-press-event', self.kbKeyPressed)
return
def _unmapCthulhuModifiersForCapture(self):
"""Unmap Cthulhu modifier keys so they can be captured as bindings."""
device = cthulhu_state.device
if device is None:
return
for modifierKey in settings.cthulhuModifierKeys:
keycode = keybindings.getKeycode(modifierKey)
if keycode == 0 and modifierKey == "Shift_Lock":
keycode = keybindings.getKeycode("Caps_Lock")
if keycode:
try:
device.unmap_modifier(keycode)
except Exception:
pass
def editingCanceledKey(self, editable):
"""Stops user input of a Key for a selected key binding"""
+12 -12
View File
@@ -479,23 +479,23 @@ class FlatReviewPresenter:
bindings.add(
keybindings.KeyBinding(
"",
"f",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_MODIFIER_MASK | keybindings.SHIFT_MODIFIER_MASK,
self._handlers.get("showContentsHandler")))
bindings.add(
keybindings.KeyBinding(
"",
"c",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_CTRL_MODIFIER_MASK,
self._handlers.get("flatReviewCopyHandler")))
bindings.add(
keybindings.KeyBinding(
"",
"c",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_CTRL_MODIFIER_MASK | keybindings.SHIFT_MODIFIER_MASK,
self._handlers.get("flatReviewAppendHandler")))
bindings.add(
@@ -685,23 +685,23 @@ class FlatReviewPresenter:
bindings.add(
keybindings.KeyBinding(
"",
"f",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_MODIFIER_MASK | keybindings.SHIFT_MODIFIER_MASK,
self._handlers.get("showContentsHandler")))
bindings.add(
keybindings.KeyBinding(
"",
"c",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_CTRL_MODIFIER_MASK,
self._handlers.get("flatReviewCopyHandler")))
bindings.add(
keybindings.KeyBinding(
"",
"c",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_CTRL_MODIFIER_MASK | keybindings.SHIFT_MODIFIER_MASK,
self._handlers.get("flatReviewAppendHandler")))
bindings.add(
+4 -4
View File
@@ -126,9 +126,9 @@ class NotificationPresenter:
bindings.add(
keybindings.KeyBinding(
"",
"n",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_MODIFIER_MASK,
self._handlers.get("present_last_notification")))
bindings.add(
@@ -147,9 +147,9 @@ class NotificationPresenter:
bindings.add(
keybindings.KeyBinding(
"",
"n",
keybindings.defaultModifierMask,
keybindings.NO_MODIFIER_MASK,
keybindings.CTHULHU_CTRL_MODIFIER_MASK,
self._handlers.get("show_notification_list")))
return bindings