AnyEvent-TermKey

 view release on metacpan or  search on metacpan

lib/AnyEvent/TermKey.pm  view on Meta::CPAN

                  if( $termkey->getkey_force( my $key ) == RES_KEY ) {
                     $on_key->( $key );
                  }
               },
            );
         }
      },
   );

   return bless {
      termkey => $termkey,
      iowatch => $iowatch,
      on_key  => $args{on_key},
   }, $class;
}

=head1 METHODS

=cut

=head2 $tk = $aetk->termkey

Returns the C<Term::TermKey> object being used to access the C<libtermkey>
library. Normally should not be required; the proxy methods should be used
instead. See below.

=cut

sub termkey
{
   my $self = shift;
   return $self->{termkey};
}

=head2 $flags = $aetk->get_flags

=head2 $aetk->set_flags( $flags )

=head2 $canonflags = $aetk->get_canonflags

=head2 $aetk->set_canonflags( $canonflags )

=head2 $msec = $aetk->get_waittime

=head2 $aetk->set_waittime( $msec )

=head2 $str = $aetk->get_keyname( $sym )

=head2 $sym = $aetk->keyname2sym( $keyname )

=head2 ( $ev, $button, $line, $col ) = $aetk->interpret_mouse( $key )

=head2 $str = $aetk->format_key( $key, $format )

=head2 $key = $aetk->parse_key( $str, $format )

=head2 $key = $aetk->parse_key_at_pos( $str, $format )

=head2 $cmp = $aetk->keycmp( $key1, $key2 )

These methods all proxy to the C<Term::TermKey> object, and allow transparent
use of the C<AnyEvent::TermKey> 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 L<Term::TermKey> documentation.

=cut

# Proxy methods for normal Term::TermKey access
foreach my $method (qw(
   get_flags
   set_flags
   get_canonflags
   set_canonflags
   get_waittime
   set_waittime
   get_keyname
   keyname2sym
   interpret_mouse
   format_key
   parse_key
   parse_key_at_pos
   keycmp
)) {
   no strict 'refs';
   *{$method} = sub {
      my $self = shift;
      $self->termkey->$method( @_ );
   };
}

=head1 AUTHOR

Paul Evans <leonerd@leonerd.org.uk>

=cut

0x55AA;



( run in 0.565 second using v1.01-cache-2.11-cpan-39bf76dae61 )