Closed Bug 46004 Opened 25 years ago Closed 25 years ago

shift key is not being set for keypress events

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Brade, Assigned: Brade)

References

Details

(Keywords: platform-parity, Whiteboard: [nsbeta3+])

Attachments

(1 file)

I noticed today that when I pressed alt-shift-n to open a new composer window, I got a browser window instead. Upon further investigation (and turning on the debugging information in nsGTKEventHandler.cpp), I saw that we aren't setting the shift flag for keypress events (possibly other key events as well?). Keybindings are currently broken if they rely on the user pressing shift to use them. I'm not positive exactly how many keybindings this affects. Assigning to blizzard since he made changes to nsGtkEventHandler.cpp most recently.
reassign to ftang; I think he added isShift=false though I'm not yet sure why.
Assignee: blizzard → ftang
Keywords: correctness, nsbeta2
Kathy and I talked about this and thought that a good solution might be to make the code a little smarter, so that it disables isShift only if control or alt are not pressed (i.e. only for printable keys). Also, let's put in a comment explaining why isShift is disabled (which I guess is that we're trying to use "no modifier keys are set" as a way of indicating "this key event represents a printable character, insertable by an editor" since the event system gives us no other way of representing that concept).
Whiteboard: fix attached
I have attached a patch which works for me. I can now do the following successfully: * type capital letters in Composer and edit fields, * type lower case letters, numbers, shift-numbers, * tab and shift-tab to navigate a form, * use alt-shift-n to open a Composer window, * use arrows, shift-arrows, control-shift arrows to affect selection/caret Can anyone think of anything else that should be tested?
r=ftang and reassign back to brade.
Assignee: ftang → brade
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: fix attached → [nsbeta2+] fix attached
fix checked in for today's builds.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Target Milestone: --- → M17
*** Bug 38591 has been marked as a duplicate of this bug. ***
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Testing with 2000-08-01-04-M17 on WinNT: 1. All printable characters, shifted and unshifted, can be typed into edit fields. 2. tab and shift-tab, and all combinations of shift, ctrl, and arrowkeys do the right thing. 3. ctrl-shift-n brings up a different window than ctrl-n, but for all other alpha, ctrl-shift-alpha brings up the same window/function as the corresponding ctrl-alpha, and for all alpha corresponding to main menu names, alt-shift-alpha brings up the same window/function as the corresponding alt-alpha.
On Linux6 2000-080204-M17 Commercial build: The only instance of alt-shift-ALPHA which seems to work is for bringing up a composer window (alt-shift-n). Every other instance of alt-shift-ALPHA I've encountered does what it's alt-shift sibling is supposed to do. Not a big deal, you say? Try hitting alt-shift-z. Instead of 'Redo' you get 'Undo'. Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
First, remembering that shortcut keys on Linux do not match those on Win & Mac: bug 22515, "Shortcut keys in Linux Mozilla not in line with standards for KDE/Gnome", nsbeta3+... meaning that once it is fixed, a new composer wiondow will come up when ctrl-shift-n is typed, not alt-shift-n. Second, on Windows, undo is ctrl-z, and redo is ctrl-y, not ctrl-shift-z. I don't see *any* ctrl-shift-alpha keys on Windows, but you'll want to consult http://gooey/client/5.0/specs/keyboard/kybdnav2.htm to verify that.
Hey, is there a chance we can get that page onto mozilla.org? ( a spec? no way! )
Putting on [nsbeta2-] radar. Agree with Sean...not critical to beta2.
Whiteboard: [nsbeta2+] fix attached → [nsbeta2-] fix attached
rremoved nsbeta2 from keywords -- added nsbeta3 and nsbeta3+. Kathy -- any input on level of priority
Keywords: nsbeta2nsbeta3
Whiteboard: [nsbeta2-] fix attached → [nsbeta3+]
Target Milestone: M17 → M18
re-resolving this bug as fixed. I don't think it has been broken since I last resolved it. Using a Linux build from today, I see that alt-shift-n does appropriate bring up composer instead of navigator. Also, alt-shift-b in composer does *NOT* set bold so it is working correctly also. This bug is fixed since the shift key is now being set for keypress events. If it weren't fixed, alt-shift-n wouldn't work. I'm unaware of any problems with any particular keybindings not working. If there are bugs, they should be filed as separate (keybinding) bugs; not as a widget bug (which is what this bug is). This bug should be reopened only if *all* shift keybindings are broken on Linux.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
note to Sean Richardson: this is a Linux bug; if there is a problem on NT, it should be filed as a separate bug
Keywords: pp
Wow. This bug got convoluted in a hurry. This bug is fixed. Marking VERIFIED FIXED on: - LinuxRH62 2000-09-07-08-M18 Commercial - Win98 2000-09-07-08-M18 Mozilla - MacOS86 2000-09-07-04-M18 Commercial
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: