Is there a kbd-shortcut to open the hamburger-menu?
-
MBaas
- Posts: 709
- Joined: 15 Feb 2016 21:08
Is there a kbd-shortcut to open the hamburger-menu?
I mean the Hamburger in the breadcrumb-bar...and I'm looking for a shortcut to open that...
-
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?
I belive
If you go to
Ctrl+Backspace is what you're looking forIf 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?
No, I mean this:
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.
-
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?
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?
Thanks - sounds like a plan! I'll see if I'm able to do that...
-
MBaas
- Posts: 709
- Joined: 15 Feb 2016 21:08
Re: Is there a kbd-shortcut to open the hamburger-menu?
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...)
Does the Hamburger not have an internal ID? (Would be sooo much simpler...)
-
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?
Ask Don to add one^^
Apart from that, sure you can read it...
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?
Beautiful - thanks!
Sad to see how I suck at scripting
Sad to see how I suck at scripting
-
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?
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?
Oh, I see - great! 
-
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?
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?
Works great highend.
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?
More hamburgers for me
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...
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
-
MBaas
- Posts: 709
- Joined: 15 Feb 2016 21:08
Re: Is there a kbd-shortcut to open the hamburger-menu?
Oh well - to be honest: I'm happy with the humble script I ended up with:
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
Granted - one could be more sophisticated about the name of $inifile - but for my usage it is totally sufficient (until proof of contrary...)
Code: Select all
$hamburgerMenu = gettoken(gettoken(regexmatches(readfile("<xydata>\<xyini>"), "^CrumbHamburger=.+?(?=\r?\n|$)", "<::>"), 2, "<::>"), 2, "=", , 2);
$sel = popupnested($hamburgerMenu);But I accept the challenge
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;
XYplorer Beta Club