Re: Shortcuts addition requests

Posted by Stein Rørvik on
URL: http://imagej.273.s1.nabble.com/Shortcuts-addition-requests-tp5024203p5024213.html

I am also a keyboard freak and have like Philippe already assigned all usable keys to macros.

The solution I would wish for would be a more generic one: To allow a macro to respond to any key using scancodes or similar. For example, my keyboard has multimedia keys for previous track "|<<" and next track ">>|" that would be convenient for such slice or channel navigation.

The Nirsoft KeyboardStateView utility shows this output for some of these "special" keys:

Key Name                                Description             Key Code   Hex Key Code
VK_END                                   END key                     35           0x23
VK_HOME                               HOME key                   36           0x24
VK_MEDIA_PREV_TRACK     Previous Track key         177        0xb1
VK_MEDIA_PLAY_PAUSE     Play/Pause Media key    179        0xb3
VK_MEDIA_NEXT_TRACK     Next Track key                 176        0xb0
VK_LAUNCH_APP2                Start Application 2 key    183        0xb7

The last entry is the "calculator" key.

It would be nice to have the ability to use for example this syntax for assigning these keys to launch macros:

macro "Image Calculator [0xB7]" {
        run("Image Calculator...");
}
or perhaps [#B7] or similar. Or maybe [VK_LAUNCH_APP2] is more readable.

Then Carl could for example have put this in his StartupMacros file:

macro "First Slice [0x24]" { // VK_HOME
        setSlice(1);
}
macro "Last Slice [0x23]" { // VK_END                                  
        setSlice(nSlices);
}

I don't know if this is hard to implement?
Perhaps all this is Windows specific?

Stein

-----Original Message-----
Sent: 18. november 2020 20:14
Subject: Re: Shortcuts addition requests

Dear Michael,
I'm quite a keyboard freak especially when I'm performing analysis of quite large sets of data and thus all my function keys are already attributed.
But yes I could indeed erase two keys and attribute them to "ad hoc" macros for the time being of this analysis duty and thus this could indeed be a solution.
My best regards,
Philippe

----- Mail original -----


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html