-#define METH(n, d) {#n, (PyCFunction)keyb_##n, METH_VARARGS, #d}
-
-static PyMethodDef KeyboardMethods[] = {
- METH(bind,
- "bind(keychain, func)\n\n"
- "Binds a key-chain to a function. The keychain is a tuple of strings "
- "which define a chain of key presses. Each member of the tuple has "
- "the format [Modifier-]...[Key]. Modifiers can be 'mod1', 'mod2', "
- "'mod3', 'mod4', 'mod5', 'control', and 'shift'. The keys on your "
- "keyboard that are bound to each of these modifiers can be found by "
- "running 'xmodmap'. The Key can be any valid key definition. Key "
- "definitions can be found by running 'xev', pressing the key while "
- "its window is focused, and watching its output. Here are some "
- "examples of valid keychains: ('a'), ('F7'), ('control-a', 'd'), "
- "('control-mod1-x', 'control-mod4-g'), ('F1', 'space'). The func "
- "must have a definition similar to 'def func(keydata, client)'. A "
- "keychain cannot be bound to more than one function."),
- METH(clearBinds,
- "clearBinds()\n\n"
- "Removes all bindings that were previously made by bind()."),
- METH(grab,
- "grab(func)\n\n"
- "Grabs the entire keyboard, causing all possible keyboard events to "
- "be passed to the given function. CAUTION: Be sure when you grab() "
- "that you also have an ungrab() that will execute, or you will not "
- "be able to type until you restart Openbox. The func must have a "
- "definition similar to 'def func(keydata)'. The keyboard cannot be "
- "grabbed if it is already grabbed."),
- METH(ungrab,
- "ungrab()\n\n"
- "Ungrabs the keyboard. The keyboard cannot be ungrabbed if it is not "
- "grabbed."),
- { NULL, NULL, 0, NULL }
-};
-
-/***************************************************************************
-
- Type methods/struct
-
- ***************************************************************************/
-
-static void keyb_dealloc(PyObject *self)