Open
Bug 345902
Opened 18 years ago
Updated 2 years ago
Key mask to switch tab needs to be configurable
Categories
(Firefox :: Keyboard Navigation, defect)
Firefox
Keyboard Navigation
Tracking
()
NEW
People
(Reporter: MatsPalmgren_bugz, Unassigned)
References
()
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mconnor
:
superreview-
|
Details | Diff | Splinter Review |
The code in ctrlNumberTabSelection() is for switching between tabs in Firefox.
The marked block needs to be configurable via a preference,
either a new one or one of the existing ones ("ui.key.chromeAccess",
"ui.key.menuAccessKey" etc)
AFAICT, this tab switching feature is not yet present in SeaMonkey, but it
would be nice to have it someday and we should consider what that means for
the shortcuts under the Window menu (CTRL+1 to open Navigator and so forth).
Comment 1•18 years ago
|
||
AFAICT ui.key.accelKey is pretty much what was intended in that place. This patch additionally makes sure not to accept Accel+Shift+<#> and other modifier combinations.
NB: For easier modifier handling, it would be nice to have a .modifiers property on key events which returns a mask of all keys pressed. This would simplify handling multi-modifier combos (as e.g. for bug 340902) and also checking for exactly one modifier (as in this patch).
Attachment #230631 -
Flags: superreview?(mats.palmgren)
Attachment #230631 -
Flags: review?(mconnor)
Reporter | ||
Comment 2•18 years ago
|
||
Comment on attachment 230631 [details] [diff] [review]
use accelKey for ctrlNumberTabSelection
Simon, AFAIK I don't have superreview rights on this code.
I think we shouldn't do the event.shiftKey test in this case,
so that Accel+Shift+NUMPAD_1 etc will also work.
with that, r=mats
Attachment #230631 -
Flags: superreview?(mats.palmgren) → review+
Comment 3•18 years ago
|
||
Assignee: nobody → zeniko
Attachment #230631 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #232671 -
Flags: superreview?(mconnor)
Attachment #230631 -
Flags: review?(mconnor)
Comment 4•18 years ago
|
||
+ if (event.ctrlKey && (event.altKey || event.metaKey) ||
+ event.altKey && event.metaKey)
You need some parenthesis here to make it clear what the last && and || apply to.
Comment 5•18 years ago
|
||
(In reply to comment #4)
> You need some parenthesis here to make it clear what the last && and || apply
> to.
Seems like I got too used to operator precedence in this case. Would you mind adding rules as to when parentheses should be applied to the style guide at http://developer.mozilla.org/en/docs/JavaScript_style_guide ?
Attachment #232671 -
Attachment is obsolete: true
Attachment #232778 -
Flags: superreview?(mconnor)
Attachment #232671 -
Flags: superreview?(mconnor)
Comment 6•18 years ago
|
||
Comment on attachment 230631 [details] [diff] [review]
use accelKey for ctrlNumberTabSelection
As per bug 366084 comment#2, not ignoring Shift state for tab selection might be the better thing to do.
Advantage: <accel>+Shift+<number> can be used for something else. Disadvantage: we'll have to make sure that <accel>+<number> indeed works on all platforms (so we don't get another version of bug 357101).
Attachment #230631 -
Attachment is obsolete: false
Attachment #230631 -
Flags: superreview?(mconnor)
Comment 7•18 years ago
|
||
Mats: Can I leave the waiting for superreview and doing the check-in to you?
Assignee: zeniko → mats.palmgren
Status: ASSIGNED → NEW
Reporter | ||
Comment 8•18 years ago
|
||
Sure, no problem.
Comment 9•18 years ago
|
||
Comment on attachment 232778 [details] [diff] [review]
patch ignoring the Shift key
So, this nets out to changing the modifier from Alt to Ctrl on Linux, which is something we explicitly changed to match other apps (gedit, gnome terminal, etc)
Probably justifies its own pref at this point, the patch looks okay otherwise.
Attachment #232778 -
Flags: superreview?(mconnor) → superreview-
Updated•18 years ago
|
Attachment #230631 -
Flags: superreview?(mconnor)
Reporter | ||
Updated•13 years ago
|
Assignee: matspal → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•