
File::KeePass::Agent::unix - platform specific utilities for Agent

This module provides unix based support for the File::KeePassAgent. It should work for anything using an X server. It should not normally be used on its own.

The following methods must be provided by an FKPA OS variant.
read_configTakes the name of a key to read from the configuration file. This method reads from $HOME/.config/keepassx/config.ini.
prompt_for_fileRequests the name of a keepass database to open.
prompt_for_passRequests for the password to open the choosen keepass database. It is passed the name of the file being opened.
grab_global_keysTakes a list of arrayrefs. Each arrayref should contain a shortcut key description hashref and a callback.
$self->grab_global_keys([{ctrl => 1, shift => 1, alt => 1, key => "c"}, sub { print "Got here" }]);
The callback will be called as a method of the Agent object. It will be passed the current active window title and the generating event.
$self->$callback($window_title, \%event);
This method use X11::Protocol to bind the shortcuts, then listens for the events to happen.
send_key_pressTakes an auto-type string, the keepass entry that generated the request, the current active window title, and the generating event.
This method uses X11::GUITest to "type" the chosen text to the X server.

These methods are not directly used by the FKPA api.
home_dirUsed by read_config to find the users home directory.
xReturns an X11::Protocol object
keymapReturns the keymap in use by the X server.
keycodeTakes a key - returns the appropriate key code for use in grab_global_keys
attributesTakes an X window id - returns all of the attributes for the window.
propertyTakes an X window id and a property name. Returns the current value of that property.
propertiesTakes an X window id - returns all of the properties for the window.
wm_nameTakes an X window id - returns its window manager name.
all_childrenReturns all decended children of an X window.

Paul Seamons <paul at seamons dot com>

This module may be distributed under the same terms as Perl itself.