| 1 |
NAME |
| 2 |
|
| 3 |
Tickit::App::Plugin::EscapePrefix - Tickit application plugin for |
| 4 |
Escape-prefixed shortcut keys |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
|
| 8 |
use Tickit; |
| 9 |
use Tickit::App::Plugin::EscapePrefix; |
| 10 |
|
| 11 |
my $tickit = Tickit->new; |
| 12 |
|
| 13 |
Tickit::App::Plugin::EscapePrefix->apply( $tickit ); |
| 14 |
|
| 15 |
... |
| 16 |
|
| 17 |
$tickit->run; |
| 18 |
|
| 19 |
DESCRIPTION |
| 20 |
|
| 21 |
This package applies code to a Tickit instance to let it handle <Escape |
| 22 |
>-prefixed shortcut keys, by converting them into the equivalent |
| 23 |
<M-...> modified keys instead. |
| 24 |
|
| 25 |
Once applied using the "apply" method, the plugin will consume any |
| 26 |
plain <Escape> keys typed at the terminal. If another key arrives soon |
| 27 |
afterwards, this key will be consumed and instead a new keypress event |
| 28 |
emitted that adds the "meta" modifier to it. For example, typing |
| 29 |
<Escape> <a> will instead emit the modified key <M-a> to the |
| 30 |
application. If no subsequent key arrives after a timeout of 3 seconds |
| 31 |
then the modification will not apply. |
| 32 |
|
| 33 |
While the plugin is still pending anothey keypress to modify, a small |
| 34 |
indicator window will appear in the bottom left of the display, showing |
| 35 |
ESC- in a reverse-video style, to remind the user the keypress is |
| 36 |
pending. |
| 37 |
|
| 38 |
METHODS |
| 39 |
|
| 40 |
apply |
| 41 |
|
| 42 |
Tickit::App::Plugin::EscapePrefix->apply( $tickit ) |
| 43 |
|
| 44 |
Applies the plugin code to the given toplevel Tickit instance. |
| 45 |
|
| 46 |
TODO |
| 47 |
|
| 48 |
Much configuration - timeout; style, text and position of indicator |
| 49 |
window |
| 50 |
|
| 51 |
AUTHOR |
| 52 |
|
| 53 |
Paul Evans <[email protected]> |
| 54 |
|