Graphics::Raylib::Keyboard - Deal with Keyboard Input
version 0.020
use Graphics::Raylib::Keyboard ':all'; print "A is pressed down\n" if key_down 'a'; print "B is not being pressed down\n" if key_up 'a'; print "last key pressed is ", key_pressed, "\n";
Keys are specified in Vi-like notation. Keys returned are instances of Graphics::Raylib::Key which has the eq operator overloaded, so you don't have to care about letter case and synonyms (e.g. <CR>, <Return> and <Enter>
eq
<CR>
<Return>
<Enter>
Returns last pressed key. if a $key argument is supplied, detects if that given key has been pressed once.
Detects if key is being pressed down
Detects if a key has been released once
Detects if a key is NOT being pressed
getter/setter for the key used to exit the program
print "Exit key is ", Graphics::Raylib::Keyboard::exit_key, "\n"; Graphics::Raylib::Keyboard::exit_key("<Enter>"); # Instead of the default "<Esc>"
http://github.com/athreef/Graphics-Raylib
Graphics-Raylib
Graphics-Raylib-XS
Ahmad Fatoum <athreef@cpan.org>, http://a3f.at
<athreef@cpan.org>
Copyright (C) 2017 Ahmad Fatoum
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Graphics::Raylib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Graphics::Raylib
CPAN shell
perl -MCPAN -e shell install Graphics::Raylib
For more information on module installation, please visit the detailed CPAN module installation guide.