Tickit...ePrefix(3pm)
π Tickit::App::Plugin::EscapePrefix β the manual, but make it make sense
okay so bestie, you know how the terminal world is full of β¨keyboard shortcutsβ¨ and sometimes the fancy ones come with a little <Escape> prefix? Yeah. This page is about Tickit::App::Plugin::EscapePrefix, which is a Tickit application plugin that handles those Escape-prefixed shortcut keys for you. No cap. π«Ά
π SYNOPSIS
use Tickit;
use Tickit::App::Plugin::EscapePrefix;
my $tickit = Tickit->new;
Tickit::App::Plugin::EscapePrefix->apply( $tickit );
...
$tickit->run;
π DESCRIPTION
So here's the vibe. This package drops some code onto a Tickit instance so that instance can deal with <Escape>-prefixed shortcut keys β by turning them into the equivalent <M-...> modified keys instead. iconic behaviour, honestly.
Once you've applied it using the apply method, the plugin will consume any plain <Escape> keys you type at the terminal. Like, it eats them. π And if another key arrives soon afterwards, that key gets consumed too, and instead a brand-new keypress event is emitted with the "meta" modifier added onto it. For example, typing <Escape> <a> will instead emit the modified key <M-a> to the application. Slay.
But listen β if no subsequent key arrives after a timeout of 3 seconds, then the modification does not apply. the way that escape key just sits there aloneβ¦ tragic. π
While the plugin is still pending another keypress to modify, a small indicator window pops up in the bottom left of the display, showing ESC- in a reverse-video style β just to remind the user that the keypress is still pending. it's giving main character energy in the corner of your screen. π
π§ METHODS
β apply
Tickit::App::Plugin::EscapePrefix->apply( $tickit )
Applies the plugin code to the given toplevel Tickit instance. that's it, that's the method. π
π TODO
- Much configuration β timeout; style, text and position of indicator window
(yes bestie, the config is very much not there yet. we're manifesting it. π―οΈ)
π AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.34.0 πΈ 2022-08-11 πΈ that's the whole page, ily, go forth and escape-prefix responsibly π β¨
π¦ where this page comes from
- debian bookworm: libtickit-app-plugin-escapeprefix-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtickit-app-plugin-escapeprefix-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtickit-app-plugin-escapeprefix-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtickit-app-plugin-escapeprefix-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtickit-app-plugin-escapeprefix-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms