Is there a kbd-shortcut to open the hamburger-menu?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

I mean the Hamburger in the breadcrumb-bar...and I'm looking for a shortcut to open that...
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

WirlyWirly
Posts: 332
Joined: 21 Oct 2020 23:33
Location: XY 64-Bit | Win 11 @ 100% (3440x1440)

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by WirlyWirly »

I belive Ctrl+Backspace is what you're looking for

If you go to Tools -> Customize Keyboard Shortcuts -> Jump..., you can lookup the shortcuts by name.

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

No, I mean this:
29-10-_2020_18-49-07.png
I had looked through that jump-list but found no item that seemed to match this function...
To see the attached files, you need to log into the forum.
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by highend »

If in doubt you could get the position of the bc 1 / bc 2 controls and and open a popupmenu() there with the content of CrumbHamburger= from the .ini file...
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

Thanks - sounds like a plan! I'll see if I'm able to do that...;)
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

Duh - I can't just read "CrumbHamburger", because that setting is used twice, it seems: there is one entry =1 (which seems to enable the Hamburger) and the second one which sets the menu.

Does the Hamburger not have an internal ID? (Would be sooo much simpler...)
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by highend »

Ask Don to add one^^

Apart from that, sure you can read it...

Code: Select all

$hamburgerMenu = gettoken(gettoken(regexmatches(readfile("<xydata>\<xyini>"), "^CrumbHamburger=.+?(?=\r?\n|$)", "<::>"), 2, "<::>"), 2, "=", , 2);
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

Beautiful - thanks! :appl:
Sad to see how I suck at scripting :oops:
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by highend »

At least you get the simple way back again with getkey() (in the next beta)...
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

Oh, I see - great! :D
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by highend »

I had a few minutes, so as an example:

Code: Select all

    // We're assuming that menu entries are separated via "|" and multiple statements / expressions via ";" in "CrumbHamburger="!
    $hamburgerMenu = gettoken(gettoken(regexmatches(readfile("<xydata>\<xyini>"), "^CrumbHamburger=.+?(?=\r?\n|$)", "<::>"), 2, "<::>"), 2, "=", , 2);
    if ($hamburgerMenu) {
        // Use breadcrumb bar 1
        $bc  = controlposition("BC 1");
        $bcX = gettoken($bc, 1, "|");
        $bcY = gettoken($bc, 2, "|");
        $command = popupnested($hamburgerMenu, $bcX, $bcY);
        if ($command) {
            // Don't execute XY ids twice
            if (!regexmatches($command, "^#\d+")) {
                // We need to translate items like ":newfolder" to the button id that needs to be used for it
                if (regexmatches($command, "^:[^:]")) {
                    button $command;

                // Normal script execution
                } else {
                    load $command, , "s";
                }
            }
        }
    }
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by klownboy »

Works great highend. :tup: If Don breaks the CrumbHamburgers from 2 identical single patty burgers to slightly different burgers, you'll be able to use SC getkey. :)

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by highend »

More hamburgers for me :titter: :ninja:

This script is missing to use a temp ini and saving it's settings to it first (and read the data from there) to take all current changes to the menu into account, but I leave that to MBaas for small learning example...
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by klownboy »

highend wrote: ↑31 Oct 2020 22:00 This script is missing to use a temp ini and saving it's settings to it first (and read the data from there) to take all current changes to the menu into account...
Yeah, but it's really not that necessary unless you're frequently changing hamburgers.

MBaas
Posts: 709
Joined: 15 Feb 2016 21:08

Re: Is there a kbd-shortcut to open the hamburger-menu?

Post by MBaas »

Oh well - to be honest: I'm happy with the humble script I ended up with:

Code: Select all

  $hamburgerMenu = gettoken(gettoken(regexmatches(readfile("<xydata>\<xyini>"), "^CrumbHamburger=.+?(?=\r?\n|$)", "<::>"), 2, "<::>"), 2, "=", , 2);
  $sel = popupnested($hamburgerMenu);
W/o controlling position, it just pops up whereever the cursor is - which make it appear like a context-menu - and that's more how I use it (most options I have deal with a current or selected file(s) or folder(s)).
But I accept the challenge :D

Code: Select all

  $inifile = "%temp%\xysettings.tmp";
  if (exists($inifile)==2) {delete 0,0,$inifile;}; /* naive way to avoid name clashes */
  savesettings 1,$inifile;
  $hamburgerMenu = gettoken(gettoken(regexmatches(readfile($inifile), "^CrumbHamburger=.+?(?=\r?\n|$)", "<::>"), 2, "<::>"), 2, "=", , 2);
  $sel = popupnested($hamburgerMenu);
  delete 0,0,$inifile;
Granted - one could be more sophisticated about the name of $inifile - but for my usage it is totally sufficient (until proof of contrary...)
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

Post Reply