Forum Discussion

angela's avatar
angela
Catalyst II
4 years ago

Is there a keyboard shortcut to switch through opened tabs?

Hi community,

does anyone know, if there are any keyboards shortcut available to switch through opened tabs?

I am looking for a keyboard shortcut to

- set the focus to the tabs pane
- move back and forth inside the tab pane
- set focus back from tab pane to item window 

I think some simple shortcuts would ease up navigation - especially for administrators that have a tendency the mouse arm syndrome. I noticed that I most of the time switch to the mouse for the sole purpose of selecting another tab. 

Does anyone know a secret shortcut that could work? Or has somebody an idea to build this on, maybe with CUI?

Any input welcomed! Thanks!

Angela

7 Replies

  • It´s indeed a good candidate! 

    This was my very very first test with an "onKeyDown" Form Method. This one is only a simple test. In the end we will need a codetree solution or something similar that loads with overall Innovator (CUI init event on main header?).

    const tabsObj = aras.getMainWindow().arasTabs;
    const selectedTab = tabsObj.selectedTab;
    const currentIndex = tabsObj.tabs.indexOf(selectedTab);
    
    if (currentIndex === -1) return; 
    
    let newIndex;
    if (event.key === "ArrowRight") {    
        newIndex = (currentIndex + 1) % tabsObj.tabs.length;
    } 
    else if (event.key === "ArrowLeft") {
        newIndex = (currentIndex - 1 + tabsObj.tabs.length) % tabsObj.tabs.length;
    }
    
    const newTab = tabsObj.tabs[newIndex];
    tabsObj.selectTab(newTab,true);

    But this sample works well do demonstrate obstacles:

    1. When mouse focus is away from the tabbar, it will not work anymore. So we need a function to set the focus to the main tabbar again.
    2. Arrow keys are also used inside regular form text elements to move the cursor. So we definitely need a keyboard combination. 
    3. The shown sample would never support Ctrl keys. Ctrl keys work different that regular letters. They can be "hold" for some time. That´s why they never worked in my first test. They were only triggered once.  

     

  • Hi community, 

    are there any news on this one? 

    "Shortcut keys to control main tabs" are a no longer a part of the roadmap. But I don´t think the feature was implemented in any of the new Innovator versions. I did some tests in the recent versions, but weren´t able to switch through opened tabs by keyboard. Do I miss something?

    I made some tests with custom code and were able switch through the tabs with the arrow keys. But it didn´t work perfect, cause the arrow keys are also used for other stuff, like changing cursor position in a text field. I made some test to use a Ctrl+Arrowkey keyboard combination, but Innovator somekind of blocked the Ctrl key from the start.

    • eli_donahue's avatar
      eli_donahue
      Community Manager

      Hi Angela, I don't think this feature is planned for any upcoming releases, so it may be a good candidate for a community project. If you want to share your code in a repo, folks could collaborate to help clean up the quirks and test in different versions. This does sound like a nice feature for power users.

  • Hi mczbas,

    thanks for your tip with the custom keyboard shortcuts!

    I right now try to connect your suggested project with my discovery I made before. I am basically able to switch trough tabs via Methods with regular Form buttons. It works more or less accurate, sometimes it still switches into the wrong direction, but should be fixable.

    The bigger question is right now: Which CUI location is suitable for this kind of shortcuts? Regular item windows or search grids are not the best variant cause they are tied to certain ItemTypes.

    I need something that is generic enough. Maybe the Navigation button or the Enterprise Search pane. There are so many options....

    Where are the Aras employees in this forum when we need them?  [emoticon:dbebcc234b5646ae9035b59f9b586acd]

    • angela's avatar
      angela
      Catalyst II

      Ok, now things get really weird. Some recent events offers a lot room for speculation.

      Reason: The above topic suddenly make it to the lastest roadmap - in addition to other usability related topic I posted in this forum in the past weeks!

      To be fair: It´s excellent that this kind of topics made it to the roadmap! Thanks you![emoticon:44a8a53ad3364ea78a16c5a3229f75bb][emoticon:1435ff2429184e17bc948e4f19178e1e] 

  • Hi community,

    I found something interesting in the codetree. The tab pane is rendered by Modules\compontents\tab.js.

    This file already contains functions for keydown events!

    There are now a couple of options:

    1. Keydown events to switch through tabs are available, but I don´t know which key combinations to use

    2. Keydown events are somekind of prepared inside Innovator, but haven´t been fully implemented yet.

    3. The shown code does something completely different and I am on the wrong track.

    Has anyone of you one of the latest Innovator version (15/16/17) up and running and can check if keyboard shortcuts work there?

    Best regards!

    Angela