Closed Bug 472060 Opened 17 years ago Closed 17 years ago

Most Apple Cmd keys are not passed through to java applet.

Categories

(Core Graveyard :: Plug-ins, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: geofftitmuss, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5 Apple uses cmd keys for hotkeys, eg Ctrl S on windows is Cmd S on mac. Running a java applet within Firefox, the cmd key strokes do not reach java. (A few do, cmd c, v, and x for example) Reproducible: Always Steps to Reproduce: 1.Open given web page. 2.Click on page. 3.Type Cmd O. Actual Results: Nothing Expected Results: Open dialogue, (or sign in, if not signed in) should appear. You need to 'trust' the java applet for this to work.
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Java applets are cross platform, so it's the Ctrl-key combinations that you should use (on all platforms). I just tried Ctrl-O (and Ctrl-S) on both Windows and OS X (using Firefox 3.0.5) -- I had no problems.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
I do not believe comment #1 is valid. Only a windows user is going to think of using the ctrl key for these functions. To conform with Mac guidelines, the hot keys on Mac should use the Mac cmd key. Native Mac users will think the product broken if it does not use these keys. Anyway, if Firefox passes through Cmd X, V and C, why on earth does it choose not to pass through all the keystrokes when the focus is clearly on the java applet?
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
OK. I've now looked into this further, and there's more to it than first meets the eye. 1) Testing with my DebugPluginEvents plugin from bug 441880, I find that the browser *doesn't* send Cmd-o and Cmd-s to ordinary NPAPI plugins: Even when the focus is in this plugin, the browser (more or less) eats Cmd-o and Cmd-s and brings up its own Open File and Save File dialogs. Ordinary NPAPI plugins only see a key-down event for 'o' and 's', respectively (after the dialog closes). No key-up event is sent. And the key-down event doesn't have its 'Cmd' modifier flag set. It may be right for the browser to eat Cmd-o and Cmd-s. But if so, it should do a neater job of eating. 2) But the Java Embedding Plugin (aka the JEP), which provides Java support for Mozilla.org browsers on OS X (and of which I'm the author) isn't an ordinary NPAPI plugin. When a Java applet has the focus, the JEP gets its mouse and keyboard events directly from the OS. I need a simple AWT Java applet to test with (one that simply logs keyboard events using System.out.println()). I don't have time to write one right now. Next week should be better.
Here's a simple applet that logs key events. I adapted it from Sun sample code for a key listener: http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html With this applet it's easy to tell that, as reported, many Command key combinations don't get passed to Java applets. The ones that don't get passed are usually key combinations that mean something to the browser -- for example Command-o usually means Open File and Command-s usually means Save. But the same thing happens in Safari, and seems to be how things are intended to work with Apple's JVMs -- whether or not those JVMs are "wrapped" by the Java Embedding Plugin (as they are in Firefox, but not in Safari). In Safari, Command-o opens the browser's Open File dialog, even if the keyboard focus is in my DebugKeyEvents applet (and Command-s opens the Save As dialog). In Firefox the menu just flashes, and nothing else happens. I suppose this is a Firefox bug ... though not (of course) the one reported here. Because the problem reported here (if it's a bug at all) happens in Apple's JVMs (and not in Firefox or the JEP), I'm marking this bug invalid. If you wish, you can open a bug with Apple at https://bugreporter.apple.com/.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: