pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: How to make UnprocessedKeyHandler function in fullscreen mode?
Date Fri, 19 Jul 2013 23:30:05 GMT
Okay, then I have a couple more questions:

*         Do you have the capability to debug Pivot code itself? (that
is, do you have the source downloaded, and setup in Eclipse or whatever
IDE you are using?)

*         Or can you build the Pivot source with some debugging print


Because if either one, it would be good to see if the key events even
make it into this code in ApplicationContext.java: 1291 and following,
and if so, what is preventing the UnprocessedKeyHandler from being
called.  Basically this is the logic (for all three events):

            if (dragDescendant == null) {

                // Process the event

                Component focusedComponentLocal =


. . .

                        try {

                            if (focusedComponentLocal == null) {

                                for (Application application :
applications) {

                                    if (application instanceof
Application.UnprocessedKeyHandler) {

Application.UnprocessedKeyHandler unprocessedKeyHandler =


unprocessedKeyHandler.keyPressed(keyCode, keyLocation);




So, basically the "dragDescendant" could be non-null (doubtful), or the
"focusedComponentLocal" could be non-null (possible that fullscreen mode
puts focus somewhere we don't expect).  But, I'm thinking it is more
likely more fundamental in that the key events are never even getting
into this code.


(I'm like the teacher giving you the homework assignment ;) ... I'm a
little busy right now, or I'd do these same tests myself.)



~Roger Whitcomb


From: Erik Innocent [mailto:einnocent@gmail.com] 
Sent: Friday, July 19, 2013 4:13 PM
To: user
Subject: Re: How to make UnprocessedKeyHandler function in fullscreen


I just tried it again with output statements in keyPressed() and
keyReleased() and the problem still exists. Thank you so much for the
prompt reply! And you're welcome for the test case, I'm happy to provide
anything that makes it easier for us to get to the bottom of this =)





On Fri, Jul 19, 2013 at 6:04 PM, Roger and Beth Whitcomb
<RogerandBeth@rbwhitcomb.com> wrote:

Hi Erik,
    I haven't tried your code yet, but I wonder if you get anything from
the "keyPressed" or "keyReleased" methods either?  I could imagine a
scenario in which the keystrokes were intercepted, but not translated to
keys....  Also, I will look at the ApplicationContext code where it
dispatches things to see if there is anything strange related to
fullscreen mode that might be going on.  Thanks for the test case.

~Roger Whitcomb


On 7/19/13 3:58 PM, Erik Innocent wrote:

	How can I make UnprocessedKeyHandler function in fullscreen
mode? Which is to say, unprocessed keys seem not to be detected in
fullscreen mode. I posted a simple example here: 




	Uncomment the line w/ setFullScreen(true) to toggle back and
forth between starting in a window and fullscreen. When it works, you
should be able to press (pretty much) any key and see a log line printed
to console. Am I doing something wrong, or is this a bug?


	My versions: JRE 1.7.0_21; Mac OS X 10.6.8; Apache Pivot 2.0.2







View raw message