From 91c7e5c378b1a639c6f5383915ed68b36b7735d4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 24 Jan 2003 07:37:26 +0000 Subject: allow python to grab the keyboard. have release events go to the grabs callback. remove the modifier from teh state when a modifier key is the one being released --- src/bindings.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/bindings.hh') diff --git a/src/bindings.hh b/src/bindings.hh index 32f422ff..a9e8c986 100644 --- a/src/bindings.hh +++ b/src/bindings.hh @@ -83,6 +83,8 @@ private: Client *client); CallbackList _eventlist[NUM_EVENTS]; + + PyObject *_keybgrab_callback; public: //! Initializes an Bindings object @@ -111,12 +113,16 @@ public: //! Removes all key bindings void removeAllKeys(); - void fireKey(int screen, unsigned int modifiers,unsigned int key, Time time); + void fireKey(int screen, unsigned int modifiers,unsigned int key, Time time, + KeyAction action); void setResetKey(const std::string &key); void grabKeys(bool grab); + bool grabKeyboard(PyObject *callback); + void ungrabKeyboard(); + bool addButton(const std::string &but, MouseContext context, MouseAction action, PyObject *callback); -- cgit v1.2.3