Closed Bug 448946 Opened 16 years ago Closed 16 years ago

Switching calendar views via keys ALT+[1-4] is broken

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: sipaq)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Lightning 0.9pre 2008073119

The different views in Lightning now have CTRL+[1-4] for keybord navigation. These keys are already in use for switching between Modes and for calling the Address Book, so calling the views via keys doesn't work anymore (regression).
Lightning 0.8 used ALT+[1-4] for switching between the views. 

Reproducible: Always

Steps to Reproduce:
1. Open Lightning, switch to Calendar Mode, Month View.
2. Press CTRL+1 for switching to Day View.

Actual Results:  
Mail Mode shows up.

Expected Results:  
Lightning should show the Day View.
We decided in 390508 among others we should stick to the thunderbird-keys ctrl-1 for mail, ctrl-2 for addresses (could become ctrl-4), ctrl-3 for calendar and ctrl-4 for tasks. You're correct about the alt+[1-4] for the views not working anymore but switching (day, week, month)-views by using ctrl+[1-4] doesn't work for me, it switches between calendar, tasks, mail etc like it should in lightning 0.9pre (2008073119).
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can confirm that regression. Lightning 0.8 used ALT+[1-4] for switching the views (day, week, month) and CTRL+[1-4] for switching the mode (mail, calendar, task).

Using a recent 0.9pre nightly build the view menu now incorrectly lists CTRL+[1-4] as the shortcuts for switching the views.
Keywords: regression
Summary: Switching calendar views via keys is broken → Switching calendar views via keys ALT+[1-4] is broken
Flags: blocking-calendar0.9?
Flags: blocking-calendar0.9? → blocking-calendar0.9+
This is a regression introduced by Berend in bug 430430 on April 29 2008. This should be easy to fix. 
Assignee: nobody → bugzilla
Severity: normal → minor
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Attached patch Patch (obsolete) — — Splinter Review
This reverts the view-switching keys back to ALT-1 - ALT4

Since this bug is blocking0.9+, I would appreciate a timely review.
Attachment #332393 - Flags: review?(philipp)
Comment on attachment 332393 [details] [diff] [review]
Patch

>+    <key id="calendar-day-view-key" key="&calendar.dayView.key;" observes="calendar_day-view_command" modifiers="alt"/>
>+    <key id="calendar-week-view-key" key="&calendar.weekView.key;" observes="calendar_week-view_command" modifiers="alt"/>
>+    <key id="calendar-multiweek-view-key" key="&calendar.multiweekView.key;" observes="calendar_multiweek-view_command" modifiers="alt"/>
>+    <key id="calendar-month-view-key" key="&calendar.monthView.key;" observes="calendar_month-view_command" modifiers="alt"/>
Not sure if alt is the right thing to do here. As noted at http://developer.mozilla.org/en/docs/XUL:key alt can only be used in conjunction with another modifier. I'd suggest using "access" which I believe is the alt key on a PC and the Command key on mac. If "alt" does work on OSX (please test or have someone test), then I'm fine with that

r=philipp with "access"
Attachment #332393 - Flags: review?(philipp) → review+
Attached image screenshot on mac —
This screenshot is using: modifiers="shift any alt"

Remember "alt" equals "option" in Mac-land.  That strange railroad track siding icon is "option".

This works on Mac.  Cmd-2 brings up the Address Book while Shift-Option-2 gives me Calendar Week View.

See
Attached patch Patch v2 — — Splinter Review
New patch with modifiers="shift any alt", because just using 'alt' doesn't work on Mac and Matt tested that the new combination works on Mac as well (thank Matt). r=philipp via IRC
Attachment #332393 - Attachment is obsolete: true
Attachment #332566 - Flags: review+
Patch checked into HEAD and MOZILLA_1_8_BRANCH. --> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Component: Lightning Only → Calendar Views
QA Contact: lightning → views
Resolution: --- → FIXED
Target Milestone: --- → 0.9
How are this new keys supposed to work correctly? In Sunbird win32 Trunk build the View menu now shows that you need to press SHIFT++ALT+[1-4] (yes, three +) but only ALT+[1-4] works.
(In reply to comment #9)
> How are this new keys supposed to work correctly? In Sunbird win32 Trunk build
> the View menu now shows that you need to press SHIFT++ALT+[1-4] (yes, three +)
> but only ALT+[1-4] works.

That is correct:
What the patch basically does, is that it requires you to press ALT{1-4] to cycle through the views on Windows and Linux. Using the SHIFT key in addition is optional on those platforms.

On Mac however, you can't just use the OPTION key (the Mac equivalent of ALT) to cycle through the views. Here you need to click SHIFT as well, because the Mac requires you to use another key in addition with the OPTION key.

See also http://developer.mozilla.org/en/docs/XUL:Attribute:modifiers
The Shift++Alt+1 thing worries me a bit, but this is a core/toolkit bug I'd say. Maybe we want to do mac specific things (i.e with a #ifdef) instead to make it only show Alt+1 on windows?
I'd also suggest to mention the changes in the Sunbird release notes. Sunbird used CTRL+[1-4] for many releases without issues and now users need to switch to ALT+[1-4] (instead of SHIFT++ALT+[1-4] as shown in the menu).
I don't want to do a relnote on this one. As Philipp said, we should put the current code in an #ifdef MACOSX block and let the other platforms use ALT+[1-4] as before.

Looking at the documentation mentioned in comment 5 and comment 10, I doubt that said shortcut key ever worked on the Mac, so no need to relnote it there IMO.
Attachment #334082 - Flags: review?(philipp)
Reopening, because we have a followup patch.
Status: RESOLVED → REOPENED
Keywords: relnote
Resolution: FIXED → ---
Comment on attachment 334082 [details] [diff] [review]
Followup patch with #ifdef MACOSX as discussed in comment 11

Looks good to me, r=philipp
Attachment #334082 - Flags: review?(philipp) → review+
Whiteboard: [patch in hand]
Comment on attachment 334082 [details] [diff] [review]
Followup patch with #ifdef MACOSX as discussed in comment 11

Doesn't this patch requires some [#else]? Or does it work on Mac OS X without issues if the xul:key elements are defined twice with identical ID but different modifier?
(In reply to comment #17)
> Doesn't this patch requires some [#else]? Or does it work on Mac OS X without
> issues if the xul:key elements are defined twice with identical ID but
> different modifier?

Argh, stupid me. You're right, Stefan. I'll fix this during checkin.
Patch adjusted with stuff from comment 17 checked into HEAD and MOZILLA_1_8_BRANCH. Marking FIXED again.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: [patch in hand]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: