Topic
  • 16 replies
  • Latest Post - ‏2013-05-21T14:31:00Z by llandale
SystemAdmin
SystemAdmin
3180 Posts

Pinned topic Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

‏2011-03-28T16:22:01Z |
In many code editors or Word, if users find they are doing some repetitive robot-work, they can automate the task with a macro.

DOORS has DXL which covers the "macro" aspect but is it possible to associate a DXL function with a user-defined hot key (aka keyboard shortcut)?

If this capability is possible, what would it take to associate an unused hot key (F10 for example) with invocation of a DXL function?

I didn't see anything in the help files.
Updated on 2011-03-30T19:02:42Z at 2011-03-30T19:02:42Z by llandale
  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-28T19:07:04Z  
    If you deploy the DXL in menus with a *.idx file, you can do it. I don't recall which is which, but the *.idx file format it <NameDXL x y MenuText>, where "x" can be letters or the underscore; if letters one lets you navigate to the command via <alt-MenuMnumonc-CommandMnumonc> and the other one straight away <cntl-CommandMnumonic>.

    • Louie
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-28T20:16:07Z  
    • llandale
    • ‏2011-03-28T19:07:04Z
    If you deploy the DXL in menus with a *.idx file, you can do it. I don't recall which is which, but the *.idx file format it <NameDXL x y MenuText>, where "x" can be letters or the underscore; if letters one lets you navigate to the command via <alt-MenuMnumonc-CommandMnumonc> and the other one straight away <cntl-CommandMnumonic>.

    • Louie
    I was hoping to be able to bind a DXL function directly to a key combination.

    For example in Word:

    Keyboard Sequence Alt-D

    is bound to macro DOORSExporter.ToolbarButtonCallback's Sub ExportToDoors()

    When a Word user enters Alt-D, this ExportToDoors() subroutine is called.

    I think what you are saying is such a direct binding is not possible, but a DOORS user is limited to making a shortcut to menu items which can, in-turn, invoke a function. True?
  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-28T21:25:10Z  
    I was hoping to be able to bind a DXL function directly to a key combination.

    For example in Word:

    Keyboard Sequence Alt-D

    is bound to macro DOORSExporter.ToolbarButtonCallback's Sub ExportToDoors()

    When a Word user enters Alt-D, this ExportToDoors() subroutine is called.

    I think what you are saying is such a direct binding is not possible, but a DOORS user is limited to making a shortcut to menu items which can, in-turn, invoke a function. True?
    Yes, cntl-D will invoke a DXL program only when that program is in some menu, which has cntl-D associated with it.

    Have no idea what happens when two such menu items have the same cntl key associated with it; probably just executes the first one it finds.

    • Louie
  • bullbala
    bullbala
    31 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T05:37:46Z  
    • llandale
    • ‏2011-03-28T21:25:10Z
    Yes, cntl-D will invoke a DXL program only when that program is in some menu, which has cntl-D associated with it.

    Have no idea what happens when two such menu items have the same cntl key associated with it; probably just executes the first one it finds.

    • Louie
    Hello Louie,

    I was not clear about your post on attaching a keyboard shortcut to a .dxl which one intends to add to the menu using a .idx file.

    Can you kindly give an example ?

    For instance, let's say that I have a file called reApplyFilter.dxl which I plan to add to the menu.

    What is an .idx file and how do I create one for reApplyFilter.dxl ?

    In one .idx file, I see that the first line says "verifier V _ Tester..."
    Does that mean "Ctrl + V" is a shortcut to "verifier.dxl" present in the sub-menu "Tester..." of the menu ?

    Unfortunately, when I hit "Ctrl + V", nothing seems to happen :-)
  • PDU
    PDU
    139 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T06:21:42Z  
    • bullbala
    • ‏2011-03-29T05:37:46Z
    Hello Louie,

    I was not clear about your post on attaching a keyboard shortcut to a .dxl which one intends to add to the menu using a .idx file.

    Can you kindly give an example ?

    For instance, let's say that I have a file called reApplyFilter.dxl which I plan to add to the menu.

    What is an .idx file and how do I create one for reApplyFilter.dxl ?

    In one .idx file, I see that the first line says "verifier V _ Tester..."
    Does that mean "Ctrl + V" is a shortcut to "verifier.dxl" present in the sub-menu "Tester..." of the menu ?

    Unfortunately, when I hit "Ctrl + V", nothing seems to happen :-)
    Hi,

    no, ALT + V

    look at DXL Help / DOORS window control / The DXL Library and Addins menus.

    Pierre
  • bullbala
    bullbala
    31 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T06:34:32Z  
    • PDU
    • ‏2011-03-29T06:21:42Z
    Hi,

    no, ALT + V

    look at DXL Help / DOORS window control / The DXL Library and Addins menus.

    Pierre
    Thanks Pierre !
  • strathglass
    strathglass
    129 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T16:45:47Z  
    • bullbala
    • ‏2011-03-29T06:34:32Z
    Thanks Pierre !
    Has anyone got this working nicely on Windows (XP)? I've always had problems. The help info ("The DXL Library and Addins menus") wasn't that helpful.

    Just playing around with it now, it seems:

    #1 For the mnemonic (character in position 2 of 4 in line in IDX file):
    *If you DISPLAY (drop down) the menu holding your script's menu item (either by using keyboard shortcuts or a mouse click on the menu bar entry), then if you next press the unadorned letter that you put in position 2 (the mnemonic) for your script, this will cause the script to run.
    *Contrary to the help info, I have found no way for the ALT key being used with this letter to do anything.
    *This didn't work when I used a number instead of a letter.
    *When I had more than one script with the same mnemonic, pressing the letter as above would repeatedly highlight the first three menu items in turn having this mnemonic (I had MORE than three with this same mnemonic letter).
    *In one case (mnemonic 'q'), it didn't do anything (maybe because it was the first menu item in the list?)
    *For sub-menus, the mnemonic will cause the submenu to be displayed.

    #2 - For the accelerator (character in position 2 of 4 in line in IDX file):
    *I had some luck with this: I could use this to get CTRL-<ACCELERATOR> to automatically start my script (from within a module) (i.e. provide a working shortcut to invoke script).
    *However the actual accelerator that resulted (which is displayed beside the menu item, e.g. "CTRL+<ACCELERATOR>") never matched the <accelerator> character I entered into the idx file. Specifically, I had the following accelerator's in my IDX file and this is how DOORS displayed/mapped them:
    y -> CTRL+F10
    9 -> CTRL+9
    v -> CTRL+F7
    8 -> CTRL+8
    *If you have multiple entries resulting in the same end shortcut, seems the first one is invoked.

    If anyone knows the rules on what DOORS is really doing with these two characters, please advise.
    Louie ... maybe you could update your special version manual with "hidden text included, the incorrect text removed, and the ambiguous text" ... :)

    -strathglass
  • strathglass
    strathglass
    129 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T16:46:37Z  
    Has anyone got this working nicely on Windows (XP)? I've always had problems. The help info ("The DXL Library and Addins menus") wasn't that helpful.

    Just playing around with it now, it seems:

    #1 For the mnemonic (character in position 2 of 4 in line in IDX file):
    *If you DISPLAY (drop down) the menu holding your script's menu item (either by using keyboard shortcuts or a mouse click on the menu bar entry), then if you next press the unadorned letter that you put in position 2 (the mnemonic) for your script, this will cause the script to run.
    *Contrary to the help info, I have found no way for the ALT key being used with this letter to do anything.
    *This didn't work when I used a number instead of a letter.
    *When I had more than one script with the same mnemonic, pressing the letter as above would repeatedly highlight the first three menu items in turn having this mnemonic (I had MORE than three with this same mnemonic letter).
    *In one case (mnemonic 'q'), it didn't do anything (maybe because it was the first menu item in the list?)
    *For sub-menus, the mnemonic will cause the submenu to be displayed.

    #2 - For the accelerator (character in position 2 of 4 in line in IDX file):
    *I had some luck with this: I could use this to get CTRL-<ACCELERATOR> to automatically start my script (from within a module) (i.e. provide a working shortcut to invoke script).
    *However the actual accelerator that resulted (which is displayed beside the menu item, e.g. "CTRL+<ACCELERATOR>") never matched the <accelerator> character I entered into the idx file. Specifically, I had the following accelerator's in my IDX file and this is how DOORS displayed/mapped them:
    y -> CTRL+F10
    9 -> CTRL+9
    v -> CTRL+F7
    8 -> CTRL+8
    *If you have multiple entries resulting in the same end shortcut, seems the first one is invoked.

    If anyone knows the rules on what DOORS is really doing with these two characters, please advise.
    Louie ... maybe you could update your special version manual with "hidden text included, the incorrect text removed, and the ambiguous text" ... :)

    -strathglass
    Correction Re #2 - accelerator is defined by position 3 of 4 (not position 2).
  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-29T20:31:58Z  
    • bullbala
    • ‏2011-03-29T05:37:46Z
    Hello Louie,

    I was not clear about your post on attaching a keyboard shortcut to a .dxl which one intends to add to the menu using a .idx file.

    Can you kindly give an example ?

    For instance, let's say that I have a file called reApplyFilter.dxl which I plan to add to the menu.

    What is an .idx file and how do I create one for reApplyFilter.dxl ?

    In one .idx file, I see that the first line says "verifier V _ Tester..."
    Does that mean "Ctrl + V" is a shortcut to "verifier.dxl" present in the sub-menu "Tester..." of the menu ?

    Unfortunately, when I hit "Ctrl + V", nothing seems to happen :-)
    The first dash is the spot for the "alt" combination; saving a file can routinely be done with the sequence http://alt..f..s; 'alt' invokes the menu, 'f' calls up the 'File' menu, 's' invokes the file menu item 'save'. The 2nd dash is the cntl key which is not sequenced just pushed; cntl-b.

    Change your IDX line to http://verifier _ v Tester..., and if file "verifier.dxl" exist then cntl-v should invoke it.

    • louie
  • bullbala
    bullbala
    31 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-30T06:41:22Z  
    • llandale
    • ‏2011-03-29T20:31:58Z
    The first dash is the spot for the "alt" combination; saving a file can routinely be done with the sequence http://alt..f..s; 'alt' invokes the menu, 'f' calls up the 'File' menu, 's' invokes the file menu item 'save'. The 2nd dash is the cntl key which is not sequenced just pushed; cntl-b.

    Change your IDX line to http://verifier _ v Tester..., and if file "verifier.dxl" exist then cntl-v should invoke it.

    • louie
    Thank you Louie.
    I will try it.
  • strathglass
    strathglass
    129 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-30T10:33:10Z  
    • llandale
    • ‏2011-03-29T20:31:58Z
    The first dash is the spot for the "alt" combination; saving a file can routinely be done with the sequence http://alt..f..s; 'alt' invokes the menu, 'f' calls up the 'File' menu, 's' invokes the file menu item 'save'. The 2nd dash is the cntl key which is not sequenced just pushed; cntl-b.

    Change your IDX line to http://verifier _ v Tester..., and if file "verifier.dxl" exist then cntl-v should invoke it.

    • louie
    Unfortunately it just doesn't work for me, even though the standard DOORS alt shortcuts do work:

    ALT+F,ALT+M (just keep alt pressed): opens Module Properties dialog (std. DOORS)

    ALT+<my menu letter>,ALT+<my script mnemonic> ... doesn't do anything.
    (Behaviour is as I described in my earlier post.)

    Similarly, accelarator kind of works, just doesn't use the letter I assigned in the IDX file.
    Strange.
    -strathglass
  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2011-03-30T19:02:42Z  
    Unfortunately it just doesn't work for me, even though the standard DOORS alt shortcuts do work:

    ALT+F,ALT+M (just keep alt pressed): opens Module Properties dialog (std. DOORS)

    ALT+<my menu letter>,ALT+<my script mnemonic> ... doesn't do anything.
    (Behaviour is as I described in my earlier post.)

    Similarly, accelarator kind of works, just doesn't use the letter I assigned in the IDX file.
    Strange.
    -strathglass
    The 'alt' combinations are pressed sequencially, press 'alt' and release, then 'f' and release, then 's'. The 'cntl' combination are pressed concurrently, press and hold 'cntl', while its down press 'f', then release both.

    • Louie
  • MarcioAB2
    MarcioAB2
    1 Post

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2013-05-18T18:55:47Z  
    Correction Re #2 - accelerator is defined by position 3 of 4 (not position 2).

    Right. So, the sintax of the IDX file is four parameters, separated each other by a space: [1] [2] [3] [4]

    [1] = The name of the DXL file. It is not necessary to include the extension ( .dxl ).

    [2] = A kind of underscore. No idea what for or how to use this parm.

    [3] = A letter that will be linked to an accelerator ( CTRL-letter ). If everything works, CTRL-letter will show up at the side of the menu name ( the one defined by parm [4] below )

    [4] = The name or even a full sentence that will appear in the menu.

  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2013-05-20T17:42:59Z  
    • MarcioAB2
    • ‏2013-05-18T18:55:47Z

    Right. So, the sintax of the IDX file is four parameters, separated each other by a space: [1] [2] [3] [4]

    [1] = The name of the DXL file. It is not necessary to include the extension ( .dxl ).

    [2] = A kind of underscore. No idea what for or how to use this parm.

    [3] = A letter that will be linked to an accelerator ( CTRL-letter ). If everything works, CTRL-letter will show up at the side of the menu name ( the one defined by parm [4] below )

    [4] = The name or even a full sentence that will appear in the menu.

    The 1st underscore is for the "alt" sequence; such as alt-f-s.  Parent menu and sub-menu must be set up to allow it.  e.g. "alt" "s" is for "save" but only works when "f" is for the "file" menu; then alt-f-s works.

    As for direct 'cntl' access; if you have two menu items assigned to the same cntl-key then I think the first one found takes precedence.

    -Louie

  • MarcioAB
    MarcioAB
    1 Post

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2013-05-20T23:26:49Z  
    • llandale
    • ‏2013-05-20T17:42:59Z

    The 1st underscore is for the "alt" sequence; such as alt-f-s.  Parent menu and sub-menu must be set up to allow it.  e.g. "alt" "s" is for "save" but only works when "f" is for the "file" menu; then alt-f-s works.

    As for direct 'cntl' access; if you have two menu items assigned to the same cntl-key then I think the first one found takes precedence.

    -Louie

    Hi Louie, thanks to reply.

    For the CTRL direct access with 2 entries with the same CTRL-letter ... I think you are right: "the first one found" ... whatever is the "first one". It is not the first in the menu sequence, as I just tested it now.

    By the way, this IDX file works "on the fly". With the module opened, you can just change the IDX file ( change the access letters for example ), close the module and open it again. The new letters are working. Nice.

    I just setup a menu entry with both access ( ALT-letter1 and CTRL-letter2 ) and it works fine. For me, the direct CTRL access is better in many cases.

  • llandale
    llandale
    3035 Posts

    Re: Hotkeys (aka keyboard shortcuts), Are hotkeys user-assignable?

    ‏2013-05-21T14:31:00Z  
    • MarcioAB
    • ‏2013-05-20T23:26:49Z

    Hi Louie, thanks to reply.

    For the CTRL direct access with 2 entries with the same CTRL-letter ... I think you are right: "the first one found" ... whatever is the "first one". It is not the first in the menu sequence, as I just tested it now.

    By the way, this IDX file works "on the fly". With the module opened, you can just change the IDX file ( change the access letters for example ), close the module and open it again. The new letters are working. Nice.

    I just setup a menu entry with both access ( ALT-letter1 and CTRL-letter2 ) and it works fine. For me, the direct CTRL access is better in many cases.

    I am confident that the "1st" one would be the one determined from the menu left-to-right, and within a menu top-down.  Your experience suggests I was incorrect about the "1st one found".  Perhaps it is the "last one found".

    I find that "on the fly" is particularly annoying as it demands that your "Addins" server be "close by" to all your PC clients.  A "far away" DXL server, perhaps 50ms "ping" time, for me results in about a 40 second additional delay every time we open a module, since all those 100s of DXL files are opened and parsed in order to build the addins menu.  Would be better if DOORS would figure out the menu once, and re-use the Module menu for each module opened.  For large companies, then, we need multiple "DXL Servers" scattered around.

    I would like to point out that changing your "addins" does not work "on the fly"; the "addins" and "DOORSADDINS" variables are determined when DOORS starts and cannot be changed for the session.

    -Louie