summaryrefslogtreecommitdiff
path: root/plugins/keyboard/keyboard.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-07-10 06:18:47 +0000
committerDana Jansens <danakj@orodu.net>2003-07-10 06:18:47 +0000
commit276b2be581c6cb138b439537761ff2ca42201805 (patch)
tree753038e7990b881a2bc0e525fab1ebc45b2523e3 /plugins/keyboard/keyboard.c
parent6357583c396382dd6ed8ac42004177f204fabe62 (diff)
add misc.h with some standard enumerations with proper prefixing and capitalizations.
use the new enums throughout. provide keycodes and cursors through ob_cursor and ob_keycode functions, which use the new misc.h enums for picking the cursor and keycode.
Diffstat (limited to 'plugins/keyboard/keyboard.c')
-rw-r--r--plugins/keyboard/keyboard.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/keyboard/keyboard.c b/plugins/keyboard/keyboard.c
index 3fe74aea..45b93ac4 100644
--- a/plugins/keyboard/keyboard.c
+++ b/plugins/keyboard/keyboard.c
@@ -78,7 +78,7 @@ void plugin_setup_config()
KeyBindingTree *firstnode = NULL;
static KeyBindingTree *curpos;
-static guint reset_key, reset_state, button_return, button_escape;
+static guint reset_key, reset_state;
static Timer *chain_timer;
static void grab_for_window(Window win, gboolean grab)
@@ -177,9 +177,9 @@ static void event(ObEvent *e, void *foo)
!(grabbed_key->state & e->data.x.e->xkey.state)))
done = TRUE;
else if (e->type == Event_X_KeyPress) {
- if (e->data.x.e->xkey.keycode == button_return)
+ if (e->data.x.e->xkey.keycode == ob_keycode(OB_KEY_RETURN))
done = TRUE;
- else if (e->data.x.e->xkey.keycode == button_escape) {
+ else if (e->data.x.e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE)) {
GSList *it;
for (it = grabbed_key->actions; it; it = it->next) {
Action *act = it->data;
@@ -258,8 +258,6 @@ static void event(ObEvent *e, void *foo)
void plugin_startup()
{
- guint i;
-
curpos = NULL;
chain_timer = NULL;
@@ -268,8 +266,6 @@ void plugin_startup()
(EventHandler)event, NULL);
translate_key("C-g", &reset_state, &reset_key);
- translate_key("Escape", &i, &button_escape);
- translate_key("Return", &i, &button_return);
grab_keys(TRUE);
}