зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e4af0ef446
Коммит
5047f61194
|
@ -2329,13 +2329,28 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (('shiftKey' in aEvent && aEvent.shiftKey) ||
|
if ('altKey' in aEvent && aEvent.altKey)
|
||||||
('altKey' in aEvent && aEvent.altKey))
|
|
||||||
return;
|
return;
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
if ('metaKey' in aEvent && aEvent.metaKey) {
|
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
|
#else
|
||||||
if (('ctrlKey' in aEvent && aEvent.ctrlKey) &&
|
if (('ctrlKey' in aEvent && aEvent.ctrlKey) &&
|
||||||
|
!('shiftKey' in aEvent && aEvent.shiftKey) &&
|
||||||
!('metaKey' in aEvent && aEvent.metaKey)) {
|
!('metaKey' in aEvent && aEvent.metaKey)) {
|
||||||
if (aEvent.keyCode == KeyEvent.DOM_VK_F4 &&
|
if (aEvent.keyCode == KeyEvent.DOM_VK_F4 &&
|
||||||
this.tabbrowser.mTabBox.handleCtrlPageUpDown) {
|
this.tabbrowser.mTabBox.handleCtrlPageUpDown) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче