Skip to main content

Global HotKeys

4 replies [Last post]
james_bray
Offline
Joined: 2004-02-02

Another great desktop integration API would we a "Global HotKeys API".

This would allow an application to register a Global Hotkey, such as "CTRL+ALT+G" that would call back to a running Java application using an event.

Its easy enough to implement on Windows, relatively easy for KDE, but I'm not sure about the others.

Does anyone have any plans for implementing this?

James

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
james_bray
Offline
Joined: 2004-02-02

Wow, thanks for the responses guys.

I guess I worded that message badly though. I wasnt actually offering to implement the Global Hotkeys, just wondering if anyone else had it planned.

However, as everyone seems so keen, I will take a look into what can be achieved.

I cant promise anything though. I have relatively decent Java programming experience, but my C/C++/KDE/GNOME programming expertise is somewhat lacking. Also, my free time is fairly limited.

James

Paul Huang
Offline
Joined: 2006-02-17

Hi James

Good suggestion.

What's your specific plan for the design?

Do you want to implement a daemon like, system-wide, backend Java application, which would
1. Accept the Hot key registration
2. Wait and capture the Hot key action
3. Send message to registered application across JVM

or just a simple Hot key registration mechanism attached to each application?

-Paul

zander
Offline
Joined: 2003-06-13

Speaking for KDE;
the daemon is already running in KDE and all you need to do is register and act on it. Its unwanted to start a second daemon as you will only create problems like race-conditions and duplicate keybindings. Plus it would not be vary native as there is one GUI to manage the system-wide global keyboard shortcuts.
Easy if you want to check if your keyboard shortcut conflicts with the global 'pause' button for your media-player.

So a way to interface with the active GlobalAccel repository is needed. I just found this:
http://developer.kde.org/documentation/library/3.2-api/kdecore/html/clas...
which does not really help; but may be a good starting point.

In short; a good API to communicate between Java and the currently active (native) accel-daemon is needed.

ps. I really like this idea :)

Paul Huang
Offline
Joined: 2006-02-17

Hi James

Great to see your quick response!

You are encouraged to bring up some prototype binaries and you can then submite an Incubator project. (See
What is a incubator project? How can I add an incubator project? at https://jdic.dev.java.net/documentation/faq.html#What%20are%20the%20incu...?)
As you could see from the webpage, we'll put the incubator project into core JDIC project after it's getting mature!

Looking forward to set up the Hotkey incubator project for you!

-Paul