pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. J." <ozbt...@gmail.com>
Subject Problem with menu keyboard shortcut
Date Fri, 24 Sep 2010 07:22:11 GMT
I'm trying to enable keyboard shortcuts for my app which have menu items.
I have followed the steps described in doc (add keystroke,
actionmapping to the window) but the actions do not get executed when
pressing the corresponding keyboard shortcut.
After looking in Pivot's code, I found out that the actions are
executed only if a component in the application has the focus:

class ApplicationContext :
                        try {
==>                        if (focusedComponent == null) {
                                if (application instanceof
Application.UnprocessedKeyHandler) {
unprocessedKeyHandler =


unprocessedKeyHandler.keyReleased(keyCode, keyLocation);
                            } else {
                                if (!focusedComponent.isBlocked()) {
==>                                    consumed =
focusedComponent.keyReleased(keyCode, keyLocation);


The problem is that my app starts with a blank window with no focused
component ...
I don't want to add a component just to "enable" keyboard shortcuts in my app.

What do you think ?


View raw message