| 1 | package Term::Caca::Event::Key::Press; | ||
| 2 | 1 | our $AUTHORITY = 'cpan:YANICK'; | |
| 3 | # ABSTRACT: event generated by a key pressed | ||
| 4 | 1 | $Term::Caca::Event::Key::Press::VERSION = '3.0.1'; | |
| 5 | |||
| 6 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | extends 'Term::Caca::Event::Key'; | |
| 11 | |||
| 12 | |||
| 13 | |||
| 14 | 1 | 1; | |
| 15 | |||
| 16 | __END__ | ||
| 17 | |||
| 18 | =pod | ||
| 19 | |||
| 20 | =encoding UTF-8 | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Term::Caca::Event::Key::Press - event generated by a key pressed | ||
| 25 | |||
| 26 | =head1 VERSION | ||
| 27 | |||
| 28 | version 3.0.1 | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | use Term::Caca qw/ :events /; | ||
| 33 | |||
| 34 | my $t = Term::Caca->new; | ||
| 35 | while ( 1 ) { | ||
| 36 | my $event = $t->wait_for_event( | ||
| 37 | mask => $KEY_PRESS, | ||
| 38 | ); | ||
| 39 | |||
| 40 | print "character typed: ", $event->char; | ||
| 41 | } | ||
| 42 | |||
| 43 | =head1 DESCRIPTION | ||
| 44 | |||
| 45 | Generated when a key is pressed. | ||
| 46 | |||
| 47 | =head1 METHODS | ||
| 48 | |||
| 49 | =head2 char() | ||
| 50 | |||
| 51 | Returns the character pressed. | ||
| 52 | |||
| 53 | =head1 SEE ALSO | ||
| 54 | |||
| 55 | L<Term::Caca::Event::Key>, L<Term::Caca::Event::Key::Release> | ||
| 56 | |||
| 57 | =head1 AUTHORS | ||
| 58 | |||
| 59 | =over 4 | ||
| 60 | |||
| 61 | =item * | ||
| 62 | |||
| 63 | John Beppu <beppu@cpan.org> | ||
| 64 | |||
| 65 | =item * | ||
| 66 | |||
| 67 | Yanick Champoux <yanick@cpan.org> | ||
| 68 | |||
| 69 | =back | ||
| 70 | |||
| 71 | =head1 COPYRIGHT AND LICENSE | ||
| 72 | |||
| 73 | This software is Copyright (c) 2019, 2018, 2013, 2011 by John Beppu. | ||
| 74 | |||
| 75 | This is free software, licensed under: | ||
| 76 | |||
| 77 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004 | ||
| 78 | |||
| 79 | =cut | ||