[tomboy-list] How does the global keyboard shortcut work?
Hamlet D'Arcy
hamletdrc at gmail.com
Thu Aug 5 01:05:59 PDT 2010
Thanks Sandy, this sounds very hopeful.
We are writing an application and we would like to support global key
listeners. The application runs within the Java browser plugin, or
perhaps a full JVM in the future. As a simple example, perhaps the app
is a Contacts Manager, and clicking Super+N should open the New
Contact form even if the app is not in focus. Kind of like how Super+N
opens a new Tomboy note (that is how I configured Tomboy anyway).
Our rough idea today is to install a small program and register an
Ubuntu keyboard shortcut to call the program, and then maybe send a
signal/socket message to the main app running in the background so it
can open the new Contact form. That seems heavy and a bad workaround
to me though. I'll take a look at XKeybinder.cs... if you can
integrate with XGrabKey from C# then you can probably do the same with
Java.
--
Hamlet D'Arcy
hamletdrc at gmail.com
On Wed, Aug 4, 2010 at 10:30 PM, Sandy Armstrong
<sanfordarmstrong at gmail.com> wrote:
> On Wed, Aug 4, 2010 at 11:55 AM, Hamlet D'Arcy <hamletdrc at gmail.com> wrote:
>> Hi all,
>>
>> I am a happy Tomboy user and really like the global Ubuntu keyboard
>> shortcut I can use to create a new note.
>>
>> My question is about how technically the global key listener works. I
>> got the TomBoy source code and see tomboykeybinding.c, but I have no
>> experience with native Ubuntu code, so it isn't much help to me.
>
> It's the XGrabKey part that actually does the keybinding.
>
> If you'd explain a bit more about what you actually want to do, we
> could probably help. You can certainly use libtomboy in your project;
> it's very popular for other projects to use it when they need to
> perform global keybindings, and it's released under the very liberal
> MIT/X11 license.
>
> You can see an example of its use in managed code by looking at
> Tomboy's XKeybinder.cs.
>
> Sandy
>
More information about the Tomboy-list
mailing list