CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 25 Aug 2025 04:08:18 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20180611021906
location: https://web.archive.org/web/20180611021906/https://github.com/gitpan/Term-TermKey-Async
server-timing: captures_list;dur=0.913303, exclusion.robots;dur=0.032896, exclusion.robots.policy;dur=0.014748, esindex;dur=0.014670, cdx.remote;dur=13.745399, LoadShardBlock;dur=211.088171, PetaboxLoader3.datanode;dur=47.374841, PetaboxLoader3.resolve;dur=48.980067
x-app-server: wwwb-app220
x-ts: 302
x-tr: 271
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app220; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 25 Aug 2025 04:08:19 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: GitHub.com
x-archive-orig-date: Mon, 11 Jun 2018 02:18:53 GMT
x-archive-orig-transfer-encoding: chunked
x-archive-orig-status: 200 OK
x-archive-orig-cache-control: no-cache
x-archive-orig-vary: X-PJAX
x-archive-orig-set-cookie: logged_in=no; domain=.github.com; path=/; expires=Fri, 11 Jun 2038 02:18:53 -0000; secure; HttpOnly
x-archive-orig-set-cookie: _gh_sess=SG5ENjlJUUNxSS9lRnBMb3hjUzV6RFBiWEVpdklaWWVlYVFlNzdESkVETk9FWkNldjNWTUxVL1M1TUtLcHAwLzFFUmoxc0FlT1A3a1ZwaGw4eDh6MDJ4a0JaMkk3ZzcydWZrdkllR25SQUc3UUllOVdySFlmT1psck0vZ2s0OEN1V2xYYWZBWEhmSkRNSU0yNEEzbVdFdXpPWDBua1hBRW5INkJLMHg4ZEY0cVNMY1MyWmtXZytMWlptMlppc1V5SzNTWFVheHR5NVpjYko4dTZOa2VuS1p1U3J3VVpSVU1jSXBSdjFPQzFYTEl2amljajV5a1hxTE5kRkkrWEdTWXdCbExTcU9USktoOUIyZEtNYVpiemFrSnBLZWxUbHhUbUdua2FORXdqdVc5N25wc3BjSjhkakZwamNPZDkvUG5lWUdTWjFHVG1mMm5YS29vSDFncU50UEsxZTRKQ051QW5wSVdWbHk3YjVrOEk5eEM2Rjdya1hLZjRGOFE4NEhFU2phZ2FXOWFET0FDUTdJa3loV3ducGZQd0hnR2J3L3VuUnd6VE9NdisvRT0tLWVLQlpqRWoxS3hibnV4ckREcDhmd3c9PQ%3D%3D--718c7bc1276be90e0dbc00d31470f634f373ae42; path=/; secure; HttpOnly
x-archive-orig-x-request-id: 2135997a-1940-483d-a2ea-cc8c509ad5d6
x-archive-orig-x-runtime: 0.481945
x-archive-orig-strict-transport-security: max-age=31536000; includeSubdomains; preload
x-archive-orig-x-frame-options: deny
x-archive-orig-x-content-type-options: nosniff
x-archive-orig-x-xss-protection: 1; mode=block
x-archive-orig-expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
x-archive-orig-content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
x-archive-orig-x-runtime-rack: 0.494373
x-archive-orig-x-github-request-id: B8C4:58FA:82E0A06:EA6553D:5B1DDC0C
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Mon, 11 Jun 2018 02:19:06 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 11 Jun 2018 02:19:06 GMT", ; rel="memento"; datetime="Mon, 11 Jun 2018 02:19:06 GMT", ; rel="next memento"; datetime="Thu, 10 Sep 2020 11:43:48 GMT", ; rel="last memento"; datetime="Thu, 10 Sep 2020 11:43:48 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: archiveteam_github_20180704082717/archiveteam_github_20180704082717.megawarc.warc.gz
server-timing: captures_list;dur=0.480214, exclusion.robots;dur=0.017164, exclusion.robots.policy;dur=0.008628, esindex;dur=0.011822, cdx.remote;dur=7.051108, LoadShardBlock;dur=140.105899, PetaboxLoader3.datanode;dur=106.647415, PetaboxLoader3.resolve;dur=181.321876, load_resource;dur=190.017920
x-app-server: wwwb-app220
x-ts: 200
x-tr: 411
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
GitHub - gitpan/Term-TermKey-Async: Read-only release history for Term-TermKey-Async
Fetching latest commit…
Permalink
Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Read-only release history for Term-TermKey-Async
https://metacpan.org/release/Term-Term…
Perl
Switch branches/tags
Nothing to show
stable
gitpan_version/0.08
gitpan_version/0.07
gitpan_version/0.06
gitpan_version/0.05
gitpan_version/0.04
gitpan_version/0.03
gitpan_version/0.02
gitpan_version/0.01
cpan_version/0.08
cpan_version/0.07
cpan_version/0.06
cpan_version/0.05
cpan_version/0.04
cpan_version/0.03
cpan_version/0.02
cpan_version/0.01
cpan_path/PEVANS/Term-TermKey-Async-0.08.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.07.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.06.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.05.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.04.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.03.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.02.tar.gz
cpan_path/PEVANS/Term-TermKey-Async-0.01.tar.gz
PEVANS
Nothing to show
Clone or download
Launching GitHub Desktop...
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop...
If nothing happens, download GitHub Desktop and try again.
Launching Xcode...
If nothing happens, download Xcode and try again.
Launching Visual Studio...
If nothing happens, download the GitHub extension for Visual Studio and try again.

Cannot retrieve the latest commit at this time.
Failed to load latest commit information. | |||
![]() |
examples | ||
![]() |
lib/Term/TermKey | ||
![]() |
t | ||
![]() |
Build.PL | ||
![]() |
Changes | ||
![]() |
LICENSE | ||
![]() |
MANIFEST | ||
![]() |
META.json | ||
![]() |
META.yml | ||
![]() |
Makefile.PL | ||
![]() |
README |
README
NAME `Term::TermKey::Async' - terminal key input using `libtermkey' with `IO::Async' SYNOPSIS use Term::TermKey::Async qw( FORMAT_VIM KEYMOD_CTRL ); use IO::Async::Loop; my $loop = IO::Async::Loop->new(); my $tka = Term::TermKey::Async->new( term => \*STDIN, on_key => sub { my ( $self, $key ) = @_; print "Got key: ".$self->format_key( $key, FORMAT_VIM )."\n"; $loop->loop_stop if $key->type_is_unicode and $key->utf8 eq "C" and $key->modifiers & KEYMOD_CTRL; }, ); $loop->add( $tka ); $loop->loop_forever; DESCRIPTION This class implements an asynchronous perl wrapper around the `libtermkey' library, which provides an abstract way to read keypress events in terminal-based programs. It yields structures that describe keys, rather than simply returning raw bytes as read from the TTY device. This class is a subclass of `IO::Async::Handle', allowing it to be put in an `IO::Async::Loop' object and used alongside other objects in an `IO::Async' program. It internally uses an instance of Term::TermKey to access the underlying C library. For details on general operation, including the representation of keypress events as objects, see the documentation on that class. Proxy methods exist for normal accessors of `Term::TermKey', and the usual behaviour of the `getkey' or other methods is instead replaced by the `on_key' event. EVENTS The following events are invoked, either using subclass methods or CODE references in parameters: on_key $key Invoked when a key press is received from the terminal. The `$key' parameter will contain an instance of `Term::TermKey::Key' representing the keypress event. CONSTRUCTOR $tka = Term::TermKey::Async->new( %args ) This function returns a new instance of a `Term::TermKey::Async' object. It takes the following named arguments: term => IO or INT Optional. File handle or POSIX file descriptor number for the file handle to use as the connection to the terminal. If not supplied `STDIN' will be used. PARAMETERS The following named parameters may be passed to `new' or `configure': flags => INT `libtermkey' flags to pass to constructor or `set_flags'. on_key => CODE CODE reference for the `on_key' event. METHODS $tk = $tka->termkey Returns the `Term::TermKey' object being used to access the `libtermkey' library. Normally should not be required; the proxy methods should be used instead. See below. $flags = $tka->get_flags $tka->set_flags( $flags ) $canonflags = $tka->get_canonflags $tka->set_canonflags( $canonflags ) $msec = $tka->get_waittime $tka->set_waittime( $msec ) $str = $tka->get_keyname( $sym ) $sym = $tka->keyname2sym( $keyname ) ( $ev, $button, $line, $col ) = $tka->interpret_mouse( $key ) $str = $tka->format_key( $key, $format ) $key = $tka->parse_key( $str, $format ) $key = $tka->parse_key_at_pos( $str, $format ) $cmp = $tka->keycmp( $key1, $key2 ) These methods all proxy to the `Term::TermKey' object, and allow transparent use of the `Term::TermKey::Async' object as if it was a subclass. Their arguments, behaviour and return value are therefore those provided by that class. For more detail, see the Term::TermKey documentation. AUTHOR Paul Evans <leonerd@leonerd.org.uk>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.