+ if (!_keybgrab_callback) return; // not grabbed
+
+ _keybgrab_callback = 0;
+ XUngrabKeyboard(**otk::display, CurrentTime);
+}
+
+
+void Bindings::fireKey(int screen, unsigned int modifiers, unsigned int key,
+ Time time, KeyAction::KA action)
+{
+ if (_keybgrab_callback) {
+ Client *c = openbox->focusedClient();
+ KeyData data(screen, c, time, modifiers, key, action);
+ python_callback(_keybgrab_callback, &data);
+ }
+
+ // KeyRelease events only occur during keyboard grabs
+ if (action == KeyAction::Release) return;
+