This module allows to grab all keyboard inputs until stopped. It is used to gather input data (such as in awful.prompt), implement VI-like keybindings or multi key transactions such as emulating the Alt+Tab behavior.
Note that this module has been redesigned in Awesome 4.3 to be object oriented and stateful. The use of the older global keygrabbing API is discouraged going forward since it had problem with recursive keygrabbers and required a lot of boiler plate code to get anything done.
Here is a basic implementation of such a system. Note that the action functions themselves are not implemented to keep the example size and complexity to a minimum. The implementation is just if/elseif of all action and the code can be found in the normal rc.lua keybindings section:
By default, the event is press. It is common for use case like the awful.prompt where return (enter) will terminate the keygrabbing. Using release as an event is more appropriate when the keygrabber is tied to a modifier key. For example, an Alt+Tab implementation stops when mod1 (Alt) is released.
The keygrabber instance is created when the keygrabber starts. It is an object mirroring this keygrabber object, but where extra properties can be added. It is useful to keep some contextual data part of the current transaction without poluting the original object of having extra boilerplate code.
Note that only a single keygrabber can be started at any one time. If another keygrabber (or this one) is currently running. This method returns false. Returns:
The keygrabber module provides two primary functions: it providesroutines used to retrieve records from the history database and it implementsthe KTL keywords provided by keygrabber when its internal KTL service isenabled.
Retrieve all available records corresponding to the requestedkeywords as of a given time range. keywords is expectedto be a dictionary, with KTL service names as keys, and thekeyed value a list of keyword names. The begin and endarguments are UNIX timestamps, and will be extended by onemillisecond to avoid problems with floating point inequalities.If begin is not specified, all records up to end will bereturned; if end is not specified, all records after beginwill be returned. If neither begin nor end is specified,all records for that service+keyword combination will be returned.If prime is True (the default) and begin is specified, themost recent record before begin will be included in the results.
If dict is False, the results will be returned as a list oflists, as is typical for the fetchall() method of a pgdbcursor instance. The columns are as follows: service, keyword,time, binvalue, ascvalue, repeated, discarded. If dict is True(the default), each result in the sequential list will be adictionary instead of a list, with the column names as keys.
Return a per-keyword tally of how long each individual keywordin the specified keywords had a particular value. The resultswill be returned as a dictionary, with each keyword as a key;each value in that dictionary will likewise be a dictionary,but instead keyed by the value of the keyword itself. If binningis specified, numeric results will be binned to the nearestround value; for example, if 0.1 is specified, numeric valueswill be binned to the nearest 0.1; if 10, the nearest 10. Theremainder of the arguments are interpreted the same way as theyare for retrieve().
Return a version number for this module. The versionnumber is computed by multiplying the major CVS revision ofeach individual component by 1,000, directly adding the minorversion, and summing the results. SVN revision numbers arestrictly added.
Built-in 4GB memory allows to store up to 1 000 000 pages of text consisting of captured key strokes. To commence operation, KeyGrabber Premium needs simply to be connected between a USB port and a keyboard. It is undetectable by the operating system, and does not indicate its operation in any way, making detection of the keygrabber virtually impossible.
Collected data is formed into text files accessible directly from the device, or remotely. In the former case, connect KeyGrabber Premium to a computer and switch it to read mode using a specific key combination. A configuration file stored in the device's memory allows e.g. to define an e-mail address to which the files should be sent, making it possible to access collected data remotely, eliminating the necessity to tamper with the computer. WiFi module enables wireless Internet connection. It is also possible to remotely access gathered information and control the KeyGrabber Premium USB via TCP/IP protocol. These features make using the device utterly safe, ensuring the operator's anonymity and eliminating the necessity to access the supervised employee's or child's computer directly.
Choosing language and character system to be used by the device is simple, while the configuration file allows to adjust settings to the user's requirements, e.g. keyboard shortcuts, triggering keystroke capturing on or off, WLAN configuration, e-mail, and more. The user manual contains all the necessary information. Due to its numerous functionalities, ease of configuration, and remote control and access to gathered information, KeyGrabber WiFi Premium USB is a perfect tool for maintaining a child's security on the Internet, monitoring an employee's computer, or creating a backup copies of documents.
1. Power Down This procedure completes a global power down of the instrument, to get it ready to be disconnected from the grid. Note that this also powers down the temperature controller, with the result that the CCD will cool down below the recommended temperature. It is important to power up the instrument as quickly as possible, or at least to power up the Lakeshore Blue controller. The entire procesure is scripted. The command to run (as kcwirun) is:kcwiPowerDownor from the Background Menu: KCWI Engineering -> Power Down KCWI If the procedure fails, or if a manual power down is preferred, these are the steps to take