diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index 5c2145f0e7..e23f91a7bb 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -122,13 +122,11 @@ append config { - - - - - - - + + + + + diff --git a/repos/os/src/server/nitpicker/README b/repos/os/src/server/nitpicker/README index 36ce02bcbe..0e9cfb847b 100644 --- a/repos/os/src/server/nitpicker/README +++ b/repos/os/src/server/nitpicker/README @@ -33,16 +33,13 @@ keyboard shortcuts, namely the X-ray mode and the kill mode. The keys for toggling those functions can be defined as follows: ! -! -! -! -! +! +! ! -The '' node contains the policy for handling global keys. Each -'' subnode expresses a rule for named key. The 'operation' attribute -refers nitpicker's built-in operations. In the example above, the X-ray -mode can be activated via the scroll-lock key and the kill mode can be +Each '' node expresses a rule for a named key. The 'operation' +attribute refers nitpicker's built-in operations. In the example above, the +X-ray mode can be activated via the scroll-lock key and the kill mode can be activated via the print key. Alternatively to specifying an 'operation' attribute, a key node can contain @@ -55,10 +52,8 @@ the key specified in the '' node. For the routing of global keys to clients, the order of '' nodes is important. If multiple nodes exists for different labels, the first match will take effect. For example: -! -! -! -! +! +! The "launchpad" client will receive all key sequences starting with F11 unless the "launchpad -> testnit" program is running. As soon as testnit gets started diff --git a/repos/os/src/server/nitpicker/global_keys.cc b/repos/os/src/server/nitpicker/global_keys.cc index ae2e11d36d..2d4b69c115 100644 --- a/repos/os/src/server/nitpicker/global_keys.cc +++ b/repos/os/src/server/nitpicker/global_keys.cc @@ -33,14 +33,16 @@ void Global_keys::apply_config(Session_list &session_list) for (unsigned i = 0; i < NUM_POLICIES; i++) _policies[i].undefine(); + char const *node_type = "global-key"; + using Genode::Xml_node; try { - Xml_node node = Genode::config()->xml_node().sub_node("global-keys").sub_node("key"); + Xml_node node = Genode::config()->xml_node().sub_node(node_type); - for (; ; node = node.next("key")) { + for (; ; node = node.next(node_type)) { if (!node.has_attribute("name")) { - PWRN("attribute 'name' missing in config node"); + PWRN("attribute 'name' missing in config node"); continue; }