Scene:key_pressed
Called from love.keypressed.
Usage
scene:key_pressed(key, scan_code, is_repeat)
Arguments
| Name | Type | Description |
|---|---|---|
key | love.KeyConstant | Character of the pressed key. |
scan_code | love.KeyConstant | The scancode representing the pressed key. |
is_repeat | boolean | Whether this keypress event is a repeat. The delay between key repeats depends on the user’s system settings. |
Examples
local MyScene = Class("MyScene", crystal.Scene);
MyScene.key_pressed = function(self, key, scan_code, is_repeat)
print(key);
end