Closed
Bug 10515
Opened 26 years ago
Closed 26 years ago
[PP] incorrect logic in keybindings with Control/Command key
Categories
(Core :: XUL, defect, P3)
Core
XUL
Tracking
()
VERIFIED
FIXED
M9
People
(Reporter: Brade, Assigned: saari)
Details
(Whiteboard: have a fix in hand)
Add the following keybinding (if it isn't already present):
in mozilla/editor/ui/composer/content/EditorAppShell.xul, below </script> add:
<keyset>
<key id="wcmdkey" disabled="false" shift="false" command="true" alt="false"
key="w" onkeypress="EditorClose()"/>
</keyset>
Comments from joki:
To get this to work on a PC you currently have to set both in the key handler.
Saari has the code ifdeffed to return true for isCommand on a PC if the control
key is down but it also, of course, returns true to isControl. Since the handler
is only defined for command, not command and control, the match fails.
Expectation: I expect to only define the keybinding once in xul as above.
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M9
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Whiteboard: have a fix in hand
Comment 1•26 years ago
|
||
Joining cc list because I'm eagerly awaiting having keybindings work on linux.
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 2•26 years ago
|
||
The logic has been changed to this:
PRBool isCommand = PR_FALSE;
PRBool isControl = PR_FALSE;
theEvent->GetMetaKey(&isCommand);
theEvent->GetCtrlKey(&isControl);
if (((isCommand && (modCommand != "true")) ||
(!isCommand && (modCommand == "true"))) &&
((isControl && (modControl != "true")) ||
(!isControl && (modControl == "true"))))
break;
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•