The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Keybinder - Perl extension that wraps libkeybinder for GTK apps

SYNOPSIS

  use Keybinder;

  bind_key('<Ctrl>B' => sub{ ... });
  bind_key('<Shift>F1' => sub{ ... });
  bind_key('<Ctrl><Alt>V' => sub{ ... });
  unbind_key('<Ctrl>B');

DESCRIPTION

Gtk2 toolkit is great, but it does not provides "global" hotkeys availability, i.e. catching some accelerator press event while current window is not active. libkeybinder has been developed to fill that gap.

The current bindings aren't complete, but enough for my purposes.

The accelerator representatic string should be accepted by gtk_accelerator_parse. Here is an extraction:

  The format looks like "<Control>a" or "<Shift><Alt>F1" or "<Release>z"
  (the last one is for key release). The parser is fairly liberal and allows
  lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>".

EXPORT

bind_key, unbind_key

SEE ALSO

https://github.com/engla/keybinder, https://developer.gnome.org/gtk3/

AUTHOR

Ivan Baidakou (a.k.a. basiliscos) <dmol@(cpan.org)>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by Ivan Baidakou

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.3 or, at your option, any later version of Perl 5 you may have available.