Closed Bug 85859 Opened 23 years ago Closed 23 years ago

Sun's Copy/Cut/Paste key don't work on HTML Editor

Categories

(Core :: DOM: Editor, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

CLOSED FIXED
mozilla1.0

People

(Reporter: masaki.katakai, Assigned: sep)

References

Details

(Whiteboard: [keybnd], SunKey)

Attachments

(2 files)

I can use Copy/Cut/Paste of sun's keyboards on single line text field, but those don't work on HTML editor, e.g. Composer and HTML editor of Mail Compose.
Ann--is this something you could help with? If not, could you suggest someone who could? Thanks!
Whiteboard: [keybnd]
Target Milestone: --- → mozilla1.0
I've attached patch for mozilla/editor/base/nsEditorEventListeners.cpp that contains code for Sun Copy/Paste/Cut support. Please, review it. After patching these keys are working the same way as composer (for 'copy' case) and text fields (for 'paste' case), and mouse copy/paste operations. Undo works after these operations.
-->akkana Akkana--please review the patch attached. Do we want to hard code F16, 18, and 20 for all platforms or should we have these in a keybindings file or ?
Assignee: beppe → akkana
Keywords: patch
Oh, here's a thought... I am wondering if the copy key will work if you make a selection in a browser window and press the key. Could someone try that? Thanks!
Yes, it surely works. If you press 'copy' key in browser, PresShell::DoCopy is calling.
Sorry for hardcoding. So, one more fix. Apply to mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml Fix just add corresponding bindings to "editor" section. Also I've added F14 ("undo" key) to bindings.
these same keybindings should also be added to <binding id="textAreas"> and << binding id="inputFields"> in the same file.
Adding Aaron, who owns the general keybinding list. I'm not sure what the right thing to do is here. Our standing policy up to now has been not to add bindings that apply only to one platform to files that should apply to all platforms: see bug 13186 for more examples. But past examples have related to adding key definitions to the general event API when they don't apply to all platforms (for example, the Sun help key, or the windows key which doesn't exist on mac or on most proprietary unices), which is a little different from adding bindings to keys which are apparently already supported by our event API. If we do this, we should change the keybinding document to reflect the new keys we're supporting (Aaron, how do you feel about this and about the platform-specific issue in general?) I don't have a problem with doing this right now. It's only a couple of bindings, but it does open the door to the larger question. I'd be happier if this change could go in a separate file and be loaded only on Sun since they apply only to Sun, but unfortunately I don't think we have a mechanism for that. As for the code, it looks fine EXCEPT that I'd like to see a clear comment somewhere nearby explaining that F14, 16, 18 and 20 are Sun-specific keys, so that we can easily find the code again once we decide what our policy is. Do that, and r=akkana, but do please get Aaron's comments on the general issue. Back to Sergi ...
Assignee: akkana → sep
Oh, wait. I was reviewing the second patch because I thought it replaced the first. I just looked at the first and see that this bug also adds the F-key defines. I'd really like to see us resolve a policy on bug 13168 (sorry, I got the number wrong on the last comment) before adding any platform-specific event handlers and corresponding bindings. Let's get Aaron's comments and maybe some from other key-binding folks and decide what to do about these platform keys. Joki, what's the status of the WG specs -- wasn't there supposed to be some decision coming up in the next version of the spec regarding platform-specific keys?
One note on specific keys: look at file mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml, part <binding id="browser">. Mozilla already has bindings for F16,18,20: <handler event="keypress" keycode="VK_F20" command="cmd_cut" /> <handler event="keypress" keycode="VK_F16" command="cmd_copy" /> <handler event="keypress" keycode="VK_F18" command="cmd_paste" /> (lines 166-168). One more note is that this file does NOT set key bindings for ALL platforms but unix. So we can add these four strings to bindings. Or, for example, split 'unix' dir into 'unix' and 'solaris' (or 'sparc' 'cause sparc linux has the same keys :) ). I think, split idea is not good.
thanks a lot for your information Sergi, but there is no <ns6 home>/res/platformHTMLBindings.xml file at all, with SUNWns6: Netscape 6 Mozilla/5.0 (X11; U; SunOS 5.8 sun4u; en-US; m18) Gecko/20010307 Netscape6/6.01 I believe this is nevertheless a default configuration bug. BugTraqID:4459845
In case we have a number of different platforms with specific kays, we should not overload default configuration with these specifics. Also, we can find documentation about mozilla keybindings customisation: http://www.mozilla.org/unix/customizing.html#keys So, I propose to close this bug.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Close bug.
Status: RESOLVED → CLOSED
Blocks: sunkeymeta
Whiteboard: [keybnd] → [keybnd], SunKey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: