Last Comment Bug 181177 - [windows] ALT keys don't work if plugin has focus
: [windows] ALT keys don't work if plugin has focus
Status: NEW
:
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: x86 Windows XP
: P3 normal with 13 votes (vote)
: ---
Assigned To: Peter Lubczynski
:
: Benjamin Smedberg [:bsmedberg]
Mentors:
http://slip.mcom.com/shrir/flashedit....
Depends on:
Blocks: 93149 PluginShortcuts
  Show dependency treegraph
 
Reported: 2002-11-20 14:24 PST by Peter Lubczynski
Modified: 2013-02-28 09:59 PST (History)
20 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.1 (6.59 KB, patch)
2002-11-20 14:32 PST, Peter Lubczynski
no flags Details | Diff | Splinter Review

Description Peter Lubczynski 2002-11-20 14:24:09 PST
We currently send all keys to plugins on Windows. This causes us to miss
important system keys like the ALT key. This bug is about fixing ALT keys in
plugins on Windows.

Steps to repro:
1. Load testcase (sorry it's internal), click in text field
2. Hit ALT (or F10). This should take you to the menus.
* Using ALT+Letter should open that menu.

Actual Retuls:
ALT does nothing.
Comment 1 Peter Lubczynski 2002-11-20 14:32:08 PST
Created attachment 106949 [details] [diff] [review]
patch v.1

So here's a patch with my first attempt. ALT keys seems to work now. The patch
causes the parent widget to the plugin to take focus in the case that a system
key event is recieved in the plugin window message pump. It then dispatches the
event to nsWindow rather than the plugin. 

One question I have is what should happen when ALT is hit twice? With this
patch, the plugin looses focus. Not sure if we'd even be able to reset focus
back to the correct spot inside the plugin.

In Opera, it doesn't appear that focus gets lost at all. I'd be nice if I
didn't have to set focus to my parent widget in order to get arrow keys to work
in the menus.
Comment 2 Jo Hermans 2002-11-20 14:49:11 PST
will this patch fix bug 78414 too ?
Comment 3 Peter Lubczynski 2002-11-20 15:09:03 PST
no, this only fixes ALT keys. Other shortcuts like CTRL+L won't work with this
patch unless you first hit ALT to give the menus focus.
Comment 4 Peter Lubczynski 2002-11-26 19:35:07 PST
It would be nice if there was a way menus could automatically be modal when
needed and return focus to the previous widget when done so focus state doesn't
have to change on the plugin.
Comment 5 rubydoo123 2002-12-05 15:31:53 PST
*** Bug 78414 has been marked as a duplicate of this bug. ***
Comment 6 Peter Lubczynski 2002-12-05 15:39:48 PST
talking with Aaron, we need a key to give focus to the document's window when
the plugin has focus. He suggested in bug 78414 to use SHITFT+ESC but that seems
to be sent to plugin windows as regular keys. From the plugins triage meeting,
we were thinking of using [ALT] + [~] to give focus to the document because it
sends special WM_SYSCHAR events.

Once focus is on the document, other shortcut keys like CTRL+L will work.
Comment 7 Aaron Leventhal 2002-12-05 15:51:00 PST
Why would Alt+~ be any different from Shift+esc? Anyway, Alt+~ would be okay,
except that it probably won't work on some international kbds. Also, do you mean
Alt+` (the unshifted version)?
Comment 8 Peter Lubczynski 2002-12-05 16:14:22 PST
Yesh, I mean the unshifted one but if it's not on intl keyboards, we should
probably pick something else. We picked an ALT key because I see in Spy it sends
a special WM_SYSCHAR message rather than just just a WM_CHAR.
Comment 9 sairuh (rarely reading bugmail) 2002-12-09 14:38:58 PST
is this a win32-only solution? since bug 78414 (all platform) was dup'd in favor
of this one, does this one provide a solution for unix and macintosh?
Comment 10 rubydoo123 2002-12-09 15:26:05 PST
yes, this addresses windows and mac and linux will be addressed next.
Comment 11 Robin Lee Powell 2004-12-06 11:13:05 PST
Umm, this is a two year old bug, but I'm still having this problem:

When a PDF is loaded in *any* tab in FireFox, using alt-tab to get back to
FireFox after being in another window causes a return to FireFox with no
keyboard commands (typing, alt-anything, etc) to work at all.  This is with a
PDF in a tab, but not the current tab.

Reproducible every time, Win2K, Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0.

-Robin
Comment 12 Tobias (:Tobbi) Markus 2008-07-29 12:19:40 PDT
Question: Isn't this a dupe of #78414 ? 
Comment 13 Marc Bejarano 2008-10-01 14:54:47 PDT
(In reply to comment #12)
> Question: Isn't this a dupe of #78414 ?

that was tried in 12/02 and failed :P

Note You need to log in before you can comment on or make changes to this bug.