Bug 417176 - "better keyboard shortcuts for switching tabs on mac os x" [p=jacob@87k.net (jacob berkman) r=Mano a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2008-03-28 23:44:15 -07:00
Родитель e4af0ef446
Коммит 5047f61194
1 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -2329,13 +2329,28 @@
return;
}
if (('shiftKey' in aEvent && aEvent.shiftKey) ||
('altKey' in aEvent && aEvent.altKey))
if ('altKey' in aEvent && aEvent.altKey)
return;
#ifdef XP_MACOSX
if ('metaKey' in aEvent && aEvent.metaKey) {
var offset = 1;
switch (aEvent.charCode) {
case '}'.charCodeAt(0):
offset *= -1;
case '{'.charCodeAt(0):
if (window.getComputedStyle(this.tabbrowser, null).direction == "ltr")
offset *= -1;
this.tabbrowser.mTabContainer.advanceSelectedTab(offset, true);
aEvent.stopPropagation();
aEvent.preventDefault();
return;
}
if ('shiftKey' in aEvent && aEvent.shiftKey)
return;
#else
if (('ctrlKey' in aEvent && aEvent.ctrlKey) &&
!('shiftKey' in aEvent && aEvent.shiftKey) &&
!('metaKey' in aEvent && aEvent.metaKey)) {
if (aEvent.keyCode == KeyEvent.DOM_VK_F4 &&
this.tabbrowser.mTabBox.handleCtrlPageUpDown) {