Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Navigate through Extension Manager tabs via Ctrl-(Shift)-Tab #8856

Merged
merged 1 commit into from
Sep 15, 2014

Conversation

marcelgerber
Copy link
Contributor

Now that we have three tabs, it's useful to be able to navigate through the tabs via Ctrl-Tab and Ctrl-Shift-Tab.
It's the shortcut used by browsers like Chrome.

@ingorichter
Copy link
Contributor

Looks good to me. Thanks @marcelgerber.

ingorichter added a commit that referenced this pull request Sep 15, 2014
Navigate through Extension Manager tabs via Ctrl-(Shift)-Tab
@ingorichter ingorichter merged commit 6b5437c into adobe:master Sep 15, 2014
@marcelgerber marcelgerber deleted the extman-navigate-tabs branch September 16, 2014 11:30

// navigate through tabs via Ctrl-(Shift)-Tab
$dlg.on("keyup", function (event) {
if (event.keyCode === KeyEvent.DOM_VK_TAB && event.ctrlKey) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Belated question @marcelgerber @ingorichter: any idea why this doesn't get snarled up by colliding with the global Ctrl-Tab shortcut for navigating between editors? Is it because we're in a modal dialog here and native menu commands are disabled while a modal is open? (On Windows at least, the menu items themselves remain enabled though, so I'm surprised that doesn't "eat" the key event). Have we tested to make sure this works ok with the non-native HTML menu bar, e.g. on Linux?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me on Linux (Ubuntu 14.04).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answering the 2nd part of my own question -- it does work with HTML menus, because Dialogs disables regular KeyBindingManager handling too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcelgerber is using "keyup" events here and global shortcuts work on keydown events.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLim is right, I didn't get an keydown event for "Tab" key. At first I thought it was a bug...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants