Skip to content

Commit

Permalink
make ctrl+num switch to tabs instead of alt+num
Browse files Browse the repository at this point in the history
  • Loading branch information
hyatt%netscape.com committed Oct 25, 2002
1 parent b34bce1 commit e770181
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions browser/base/content/browser.js
Expand Up @@ -382,7 +382,7 @@ function delayedStartup(aElt)

gBrowser.addEventListener("load", function(evt) { setTimeout(loadEventHandlers, 0, evt); }, true);

window.addEventListener("keypress", altNumberTabSelection, true);
window.addEventListener("keypress", ctrlNumberTabSelection, true);

if (gMustLoadSidebar) {
var sidebar = document.getElementById("sidebar");
Expand Down Expand Up @@ -457,17 +457,17 @@ function Shutdown()
appCore.close();
}

function altNumberTabSelection(event)
function ctrlNumberTabSelection(event)
{
if (!event.altKey)
return;

if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
if (event.altKey && event.keyCode == KeyEvent.DOM_VK_RETURN) {
// Don't let winxp beep on ALT+ENTER, since the URL bar uses it.
event.preventDefault();
return true;
}

if (!event.ctrlKey)
return;

var index = event.charCode - 49;
if (index == -1)
index = 9;
Expand Down

0 comments on commit e770181

Please sign in to comment.