Skip to content

Commit 8ed3641

Browse files
committed
Update parameter lists for keypressed and keyreleased callbacks
1 parent d75a6f8 commit 8ed3641

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

ScreenManager.lua

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,22 @@ function ScreenManager.focus( nfocus )
173173
end
174174

175175
---
176-
-- Reroutes the keypressed callback to the currently active screen.
177-
-- @param key
176+
-- Callback function triggered when a key is pressed.
177+
-- @param key - Character of the pressed key.
178+
-- @param scancode - The scancode representing the pressed key.
179+
-- @param isrepeat - Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.
178180
--
179-
function ScreenManager.keypressed( key )
180-
ScreenManager.peek():keypressed( key );
181+
function ScreenManager.keypressed( key, scancode, isrepeat )
182+
ScreenManager.peek():keypressed( key, scancode, isrepeat);
181183
end
182184

183185
---
184-
-- Reroutes the keyreleased callback to the currently active screen.
185-
-- @param key
186+
-- Callback function triggered when a keyboard key is released.
187+
-- @param key - Character of the released key.
188+
-- @param scancode - The scancode representing the released key.
186189
--
187-
function ScreenManager.keyreleased( key )
188-
ScreenManager.peek():keyreleased( key );
190+
function ScreenManager.keyreleased( key, scancode )
191+
ScreenManager.peek():keyreleased( key, scancode );
189192
end
190193

191194
---

0 commit comments

Comments
 (0)