Lagrange [work/v1.13]

Terminal: Bindings; menu navigation

=> cc93ae1f855d402ce848791e59a23439cca8b2d1

diff --git a/src/ui/keys.c b/src/ui/keys.c
index a834260f..6a12b5e7 100644
--- a/src/ui/keys.c
+++ b/src/ui/keys.c
@@ -227,7 +227,7 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =
 #endif
     { 76, { "${keys.tab.new}",              newTab_KeyShortcut,             "tabs.new"                          }, 0 },
     { 77, { "${keys.tab.close}",            closeTab_KeyShortcut,           "tabs.close"                        }, 0 },
-    { 78, { "${keys.tab.close.other}",      SDLK_w, KMOD_PRIMARY | KMOD_SHIFT, "tabs.close toleft:1 toright:1"  }, 0 },
+    { 78, { "${keys.tab.close.other}",      SDLK_w, KMOD_SECONDARY, "tabs.close toleft:1 toright:1"  }, 0 },
     { 80, { "${keys.tab.prev}",             prevTab_KeyShortcut,            "tabs.prev"                         }, 0 },
     { 81, { "${keys.tab.next}",             nextTab_KeyShortcut,            "tabs.next"                         }, 0 },
     { 90, { "${keys.split.menu}",           SDLK_j, KMOD_PRIMARY,           "splitmenu.open"                    }, 0 },
@@ -245,8 +245,8 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =
     { 120,{ "${keys.upload}",               SDLK_u, KMOD_PRIMARY,           "document.upload"                   }, 0 },
     { 121,{ "${keys.upload.edit}",          SDLK_e, KMOD_PRIMARY,           "document.upload copy:1"            }, 0 },
     { 125,{ "${keys.pageinfo}",             pageInfo_KeyShortcut,           "document.info"                     }, 0 },
-    { 126,{ "${keys.sitespec}",             ',', KMOD_PRIMARY | KMOD_SHIFT, "document.sitespec"                 }, 0 },
-    { 130,{ "${keys.input.precedingline}",  SDLK_v, KMOD_PRIMARY | KMOD_SHIFT, "input.precedingline"            }, 0 },
+    { 126,{ "${keys.sitespec}",             ',', KMOD_SECONDARY, "document.sitespec"                 }, 0 },
+    { 130,{ "${keys.input.precedingline}",  SDLK_v, KMOD_SECONDARY, "input.precedingline"            }, 0 },
     { 140,{ "${keys.identmenu}",            identityMenu_KeyShortcut,       "identmenu.open focus:1"            }, 0 },          
     { 200,{ "${keys.menubar.focus}",        SDLK_F10, 0,                    "menubar.focus"                     }, 0 },
     { 205,{ "${keys.contextmenu}",          '/', 0,                         "contextkey"                        }, 0 },
@@ -356,7 +356,11 @@ void reset_Binding(int id) {
 
 /*----------------------------------------------------------------------------------------------*/
 
+#if defined (iPlatformTerminal)
+static const char *filename_Keys_ = "cbindings.txt";
+#else
 static const char *filename_Keys_ = "bindings.txt";
+#endif
 
 void init_Keys(void) {
     iKeys *d = &keys_;
diff --git a/src/ui/util.c b/src/ui/util.c
index eaf18ac2..0e75bd9b 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -955,6 +955,9 @@ void setNativeMenuItems_Widget(iWidget *menu, const iMenuItem *items, size_t n)
 
 iWidget *parentMenu_Widget(iWidget *menuItem) {
     if (parent_Widget(menuItem)) {
+        if (!cmp_String(id_Widget(parent_Widget(menuItem)), "menu")) {
+            return parent_Widget(menuItem);
+        }
         return !cmp_String(
                    id_Widget(as_Widget(back_ObjectList(children_Widget(parent_Widget(menuItem))))),
                    "menu.cancel")
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.13/cdiff/cc93ae1f855d402ce848791e59a23439cca8b2d1
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
69.201932 milliseconds
Gemini-to-HTML Time
0.324325 milliseconds

This content has been proxied by September (ba2dc).