mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Changed the love.keypressed and love.keyreleased event callbacks to be love.keypressed(key, scancode, isrepeat) and love.keyreleased(key, scancode). Added love.keyboard.isScancodeDown. Resolves issue #993.
--HG-- branch : minor
This commit is contained in:
@@ -46,7 +46,8 @@ public:
|
||||
|
||||
void setKeyRepeat(bool enable);
|
||||
bool hasKeyRepeat() const;
|
||||
bool isDown(Key *keylist) const;
|
||||
bool isDown(const std::vector<Key> &keylist) const;
|
||||
bool isScancodeDown(const std::vector<Scancode> &scancodelist) const;
|
||||
|
||||
Key getKeyFromScancode(Scancode scancode) const;
|
||||
Scancode getScancodeFromKey(Key key) const;
|
||||
@@ -54,6 +55,9 @@ public:
|
||||
void setTextInput(bool enable);
|
||||
bool hasTextInput() const;
|
||||
|
||||
static bool getConstant(Scancode in, SDL_Scancode &out);
|
||||
static bool getConstant(SDL_Scancode in, Scancode &out);
|
||||
|
||||
private:
|
||||
|
||||
// Whether holding down a key triggers repeated key press events.
|
||||
|
||||
Reference in New Issue
Block a user