From 0a310f0b7012f363e4dda7dfd5e2d67886617d40 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 20 Aug 2026 13:39:14 +0900 Subject: [PATCH] change: normalize context menu keybind behavior for j,k keys Normalized custom menu navigation keys to be in conformity with native keybindings for Gdk.KEY_uparrow and Gdk.KEY_downarrow. --- dzgui/views/mixins/context_mixin.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dzgui/views/mixins/context_mixin.py b/dzgui/views/mixins/context_mixin.py index 19c0f42..358c65a 100644 --- a/dzgui/views/mixins/context_mixin.py +++ b/dzgui/views/mixins/context_mixin.py @@ -104,20 +104,11 @@ class ContextMixin(TreeView): return False menu = self.context_menu children = menu.get_children() - sel = menu.get_selected_item() - for i, child in enumerate(children): - if sel is child: - ind = i - break match event.keyval: case Gdk.KEY_j: - if ind + 1 > len(children) - 1: - return False menu.emit("move-current", Gtk.MenuDirectionType.NEXT) case Gdk.KEY_k: - if ind - 1 < 0: - return False menu.emit("move-current", Gtk.MenuDirectionType.PREV) case Gdk.KEY_g: menu.select_item(children[0])