Add indications for hotkeys

Features wanted...
Post Reply
paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Add indications for hotkeys

Post by paul0 »

I customized toolbar button using the script below:

Code: Select all

"&Breadcrumb|icons\breadcrumb.ico" #525;

"&Shortcuts|icons\shortcut.ico" 
   load "<xypath>\scripts\shortcuts.xys";

"&Recent Loc|:mru" button "mru";

"&Hotlist|:hotlist" button "hotlist";

"H&istory|icons\history.ico" #618;
The button is shown as the attached figure.

From the displayed button menu, we cannot the which key is hotkey. Can we add some indications, e.g. underscore or highlighted color, for those hokeys?
Attachments
the customized button on the toolbar
the customized button on the toolbar
hotkey.png (7.39 KiB) Viewed 3426 times

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Add indications for hotkeys

Post by Stefan »

Normal this works by pressing the ALT-key, then the chars with the ampersand gets underlined. (Like with XY main menu)
But the CTB-menus are closed while pressing the ALT-key. That was maybe overlooked by Don?

As an tip to see that the ampersand basically works you can press and hold the ALT-key first, and click then the button.
You will see an warning dialog and after OKing them you see the mnemonics :roll:


Maybe use an work around like this:
"(&B)readcrumb|icons\breadcrumb.ico" #525;
"(&S)hortcuts|icons\shortcut.ico"
"(&R)ecent Loc|:mru" button "mru";
"(&H)otlist|:hotlist" button "hotlist";


Ahh, btw, you know that you can jump to the first char of each menu item by just pressing that leading char, even without any ampersand used?
All you have to do after this is pressing the enter key too.
This works even if more items have the same beginning char.

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Add indications for hotkeys

Post by eil »

Stefan wrote:"(&H)otlist|:hotlist" button "hotlist";
what about these (& )? are they suppose to change something? :eh:
Win 7 SP1 x64 100% 1366x768|1900x1080

avsfan
Posts: 554
Joined: 29 Jun 2006 09:00
Location: Fort Collins, Colorado

Re: Add indications for hotkeys

Post by avsfan »

eil wrote:
Stefan wrote:"(&H)otlist|:hotlist" button "hotlist";
what about these (& )? are they suppose to change something? :eh:
I believe the difference is that not only are the hotkeys supposed to be underlined (using the "&" prefix), but the parentheses allow you to identify the hotkeys even if the underline doesn't work. (Right?)

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Add indications for hotkeys

Post by Stefan »

Right!


Sorry, i should have make this more clear, but it was just obvious to myself :roll: .

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Add indications for hotkeys

Post by eil »

avsfan wrote:I believe the difference is that not only are the hotkeys supposed to be underlined (using the "&" prefix), but the parentheses allow you to identify the hotkeys even if the underline doesn't work. (Right?)
i was guessing about something like that, but when i tried to make same thing to one of entries in my CTB drop-down menu, nothing changed -only first letter was in brackets. i must be missing something..
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: Add indications for hotkeys

Post by highend »

i must be missing something..
You aren't...
but the parentheses allow you to identify the hotkeys even if the underline doesn't work.
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Add indications for hotkeys

Post by eil »

oh, now i get it, thanks to all. :oops:
if i'd only could make a shortcut to open CTB drop-down menu of a specific button. :roll:
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: Add indications for hotkeys

Post by highend »

if i'd only could make a shortcut to open CTB drop-down menu of a specific button.
Where's the problem?

Rightclick on your button: Toolbar...

Write down the ctb<number> of your button.
Let's assume it's "ctb10".

Menu - User - Manage Commands...

"Run Script"


Script: ::button "ctb<number of your button>";
or: ::button "ctb10";

Assign your hotkey....
One of my scripts helped you out? Please donate via Paypal

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Add indications for hotkeys

Post by Stefan »

eil wrote:if i'd only could make a shortcut to open CTB drop-down menu of a specific button. :roll:
Can't you?

You know there is

Code: Select all

Scripting Commands Reference

button
Emulates a click on a toolbar button.

Syntax 
button key, [action=1]

key [required] Key that identifies the button.
You can retrieve the existing keys using the SC toolbar, 
or using the Customize Toolbar command from a user button's context menu. 

action [optional] 
0 = do nothing
1 = left-click [default]
2 = right-click
8 = dropdown arrow

paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: Add indications for hotkeys

Post by paul0 »

Stefan wrote:
Maybe use an work around like this:
"(&B)readcrumb|icons\breadcrumb.ico" #525;
"(&S)hortcuts|icons\shortcut.ico"
"(&R)ecent Loc|:mru" button "mru";
"(&H)otlist|:hotlist" button "hotlist";
Thanks, Stefan. You are exactly right. I tried this way last week but was very quite comfortable with the button menu. Here, I reproduced the menu as the attached figure and compared with two menus. The menu without parentheses is cleaner and more readable.
Attachments
hotkey2.png
hotkey2.png (11.13 KiB) Viewed 3362 times

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Add indications for hotkeys

Post by Stefan »

Don't get me wrong.

I also would like to see this "&" ampersand underline mnemonics be working :lol:
(I only wanted to feedback that you didn't did anything wrong, it just didn't works just now)

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Add indications for hotkeys

Post by admin »

Stefan wrote:Don't get me wrong.

I also would like to see this "&" ampersand underline mnemonics be working :lol:
(I only wanted to feedback that you didn't did anything wrong, it just didn't works just now)
I don't think it's possible.

Post Reply