- METHODS AND ARGUMENTS
- GIT REPOSITORY
- SEE ALSO
- COPYRIGHT AND LICENSE
Graphics::Raylib::Keyboard - Deal with Keyboard Input
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.
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
- $exit = exit_key() or exit_key("<Esc>")
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>"
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.