Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1181

Investigate: Custom shortcuts not working?

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      1.4
    • Sprint:
      Summer 5: 3 Aug - 14 Aug, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep

      Description

      User writes:

      In preferences, I created a key-stroke for "show zoom stripe" and "show zoom stripe label". The key-stroke was recorded, and subsequently displayed in the view menu next to the corresponding options.
      When I try to use my key-strokes, the view menu flickers as if it has been clicked, but there is no affect. The zoom stripe (and its label) are unchanged.
      I tried closing and re-opening IGB (as per Bug Repository BUG-445) but that had no affect.

      Investigate:

      • Reviewing User's Guide information about this feature
      • Attempt to reproduce the above scenario. Is it still a problem?
      • If yes, investigate if you can create other custom shortcuts.

      Report your findings in comments below.

        Attachments

          Activity

          Hide
          gchamma Jay Chamma (Inactive) added a comment - - edited

          [~aloraine], this problem is still present in the current published IGB, v9.1.4.
          I added and tested key-strokes for every single Action available in the Toolbar tab (85 in total), and here is what I found:

          All custome key-strokes worked as expected except the following Actions:

          1. Show Collapse Option
          2. Show Edge Matching
          3. Show Filter Mark
          4. Show Full File Path in Track
          5. Show IGB Track Mark
          6. Show Locked Track Icon
          7. Show Zoom Stripe
          8. Show Zoom Stripe Label
          9. Show Data Tooltip

          The problem continued to occur even after relaunching IGB upon adding the new key-stroke.
          If a custom key-stroke is used for one of the listed actions, pressing it won't trigger the action linked to it.
          The common denominator for these ineffective keystrokes is that they're all linked to actions that are present in the View menu and that these actions are of a binary type (can be on or off).

          However, it turns out that if these keystrokes are used as the View menu is open, then their corresponding actions will take effect.
          So for example: If I bind 'CTRL + T' to Show Zoom Stripe Label, pressing CTRL+T after loading a genome won't do anything. However, if I open the View menu and then click CTRL+T while the View menu is open, the action would take effect and the View menu would close immediately.
          This sort of behavior is not present for other option in the View menu, such as Clamp to View or Show All Visual Tools. A key stroke linked to Clamp to View or Show All Visual Tools would work perfectly and as expected, without the need to open the View menu.

          The interesting thing is that Clamp to View is also of type binary (on/off), since clicking it once activates it, and the clicking it again would deactivate it, but it does not have the same strange behavior found for the other binary type actions. It is important to note that Clamp to View does not feature an on/off symbol like the other actions, such as having a blue background around its icon when activated, so maybe that is linked to the strange behavior occurring.

          I will start looking at the code next to continue investigating this issue, please let me know of your thoughts.
          Thanks!

          Show
          gchamma Jay Chamma (Inactive) added a comment - - edited [~aloraine] , this problem is still present in the current published IGB, v9.1.4. I added and tested key-strokes for every single Action available in the Toolbar tab (85 in total), and here is what I found: All custome key-strokes worked as expected except the following Actions: Show Collapse Option Show Edge Matching Show Filter Mark Show Full File Path in Track Show IGB Track Mark Show Locked Track Icon Show Zoom Stripe Show Zoom Stripe Label Show Data Tooltip The problem continued to occur even after relaunching IGB upon adding the new key-stroke. If a custom key-stroke is used for one of the listed actions, pressing it won't trigger the action linked to it. The common denominator for these ineffective keystrokes is that they're all linked to actions that are present in the View menu and that these actions are of a binary type (can be on or off). However, it turns out that if these keystrokes are used as the View menu is open, then their corresponding actions will take effect. So for example: If I bind 'CTRL + T' to Show Zoom Stripe Label, pressing CTRL+T after loading a genome won't do anything. However, if I open the View menu and then click CTRL+T while the View menu is open, the action would take effect and the View menu would close immediately. This sort of behavior is not present for other option in the View menu, such as Clamp to View or Show All Visual Tools. A key stroke linked to Clamp to View or Show All Visual Tools would work perfectly and as expected, without the need to open the View menu. The interesting thing is that Clamp to View is also of type binary (on/off), since clicking it once activates it, and the clicking it again would deactivate it, but it does not have the same strange behavior found for the other binary type actions. It is important to note that Clamp to View does not feature an on/off symbol like the other actions, such as having a blue background around its icon when activated, so maybe that is linked to the strange behavior occurring. I will start looking at the code next to continue investigating this issue, please let me know of your thoughts. Thanks!
          Hide
          gchamma Jay Chamma (Inactive) added a comment -

          According to https://www.codejava.net/java-se/swing/setting-shortcut-key-and-hotkey-for-menu-item-and-button-in-swing
          View menu items need to have a setAccelerator method called with a keyStroke as a parameter, however I was not able to get this to work.
          I have also tried to use the setMnemonic() method, as well as the put() method, which is inherited from GenericAction class, and this also gave no results.

          Clamp to View button in View menu (ClampViewAction.java) is responsible for clamping the window of the loaded genome down to a zoomed in portion, specified by the user. This action is of toggle kind, so it can be activated, then clicked on again. Setting a keystroke for this action works as intended with no issues, and it is the only toggle-able action in the View menu that doesn't have this problem. However, if a keystroke is used for another toggle action in the View menu, such as Show Filter Mark or Show Locked Track Icon , the keystroke only works when the View menu is open upon clicking the keystroke. I compared the classes that have this issue with ClampViewAction.java to see what is allowing Clamp to View to function with a keystroke without issues, but I was not able to find anything of importance.

          Show
          gchamma Jay Chamma (Inactive) added a comment - According to https://www.codejava.net/java-se/swing/setting-shortcut-key-and-hotkey-for-menu-item-and-button-in-swing View menu items need to have a setAccelerator method called with a keyStroke as a parameter, however I was not able to get this to work. I have also tried to use the setMnemonic() method, as well as the put() method, which is inherited from GenericAction class, and this also gave no results. Clamp to View button in View menu (ClampViewAction.java) is responsible for clamping the window of the loaded genome down to a zoomed in portion, specified by the user. This action is of toggle kind, so it can be activated, then clicked on again. Setting a keystroke for this action works as intended with no issues, and it is the only toggle-able action in the View menu that doesn't have this problem. However, if a keystroke is used for another toggle action in the View menu, such as Show Filter Mark or Show Locked Track Icon , the keystroke only works when the View menu is open upon clicking the keystroke. I compared the classes that have this issue with ClampViewAction.java to see what is allowing Clamp to View to function with a keystroke without issues, but I was not able to find anything of importance.
          Hide
          ann.loraine Ann Loraine added a comment -

          Above info is sufficient. Moving to Closed.

          Show
          ann.loraine Ann Loraine added a comment - Above info is sufficient. Moving to Closed.

            People

            • Assignee:
              Unassigned
              Reporter:
              ieclabau Ivory Blakley (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: