]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
add the chainQuitKey option to teh <keyboard> section of the rc3
[chaz/openbox] / openbox / config.c
index f051452348ee4531cdb042eceb4f316ca3ba610f..19b664032426135cddd4e6e54f73b65854c8966d 100644 (file)
@@ -2,6 +2,7 @@
 #include "keyboard.h"
 #include "mouse.h"
 #include "prop.h"
+#include "translate.h"
 #include "parser/parse.h"
 
 gboolean config_focus_new;
@@ -29,6 +30,9 @@ ObOrientation   config_dock_orient;
 gboolean        config_dock_hide;
 guint           config_dock_hide_timeout;
 
+guint config_keyboard_reset_keycode;
+guint config_keyboard_reset_state;
+
 gint config_mouse_threshold;
 gint config_mouse_dclicktime;
 
@@ -49,6 +53,12 @@ static void parse_key(xmlDocPtr doc, xmlNodePtr node, GList *keylist)
     xmlNodePtr n, nact;
     GList *it;
 
+    if ((n = parse_find_node("chainQuitKey", node))) {
+        key = parse_string(doc, n);
+        translate_key(key, &config_keyboard_reset_state,
+                      &config_keyboard_reset_keycode);
+    }
+
     n = parse_find_node("keybind", node);
     while (n) {
         if (parse_attr_string("key", n, &key)) {
@@ -343,6 +353,9 @@ void config_startup()
 
     parse_register("dock", parse_dock, NULL);
 
+    translate_key("C-g", &config_keyboard_reset_state,
+                  &config_keyboard_reset_keycode);
+
     parse_register("keyboard", parse_keyboard, NULL);
 
     config_mouse_threshold = 3;
This page took 0.024104 seconds and 4 git commands to generate.