diff --git a/conf/flight_plans/basic.xml b/conf/flight_plans/basic.xml
index 78bfd12898..5228155a88 100644
--- a/conf/flight_plans/basic.xml
+++ b/conf/flight_plans/basic.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/conf/flight_plans/mission_fw.xml b/conf/flight_plans/mission_fw.xml
index daef0aaf3d..8359db5d26 100644
--- a/conf/flight_plans/mission_fw.xml
+++ b/conf/flight_plans/mission_fw.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/conf/flight_plans/poles.xml b/conf/flight_plans/poles.xml
index 0d0e539340..7241254523 100644
--- a/conf/flight_plans/poles.xml
+++ b/conf/flight_plans/poles.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/conf/flight_plans/zamboni_survey_test.xml b/conf/flight_plans/zamboni_survey_test.xml
index 7972b4d116..810c6a779d 100644
--- a/conf/flight_plans/zamboni_survey_test.xml
+++ b/conf/flight_plans/zamboni_survey_test.xml
@@ -75,7 +75,7 @@
-
+
diff --git a/sw/ground_segment/cockpit/live.ml b/sw/ground_segment/cockpit/live.ml
index 2949ca0ae8..0668a56045 100644
--- a/sw/ground_segment/cockpit/live.ml
+++ b/sw/ground_segment/cockpit/live.ml
@@ -525,7 +525,7 @@ let create_ac = fun alert (geomap:G.widget) (acs_notebook:GPack.notebook) (ac_id
let id = ExtXml.int_attrib block "no" in
begin (* Is it a key short cut ? *)
try
- let key, modifiers = GtkData.AccelGroup.parse (Xml.attrib block "key") in
+ let key, modifiers = GtkData.AccelGroup.parse (Pprz.key_modifiers_of_string (Xml.attrib block "key")) in
keys := (key, (modifiers, id)) :: !keys
with
_ -> ()
diff --git a/sw/ground_segment/cockpit/page_settings.ml b/sw/ground_segment/cockpit/page_settings.ml
index 9468fba30b..063fa15239 100644
--- a/sw/ground_segment/cockpit/page_settings.ml
+++ b/sw/ground_segment/cockpit/page_settings.ml
@@ -58,7 +58,7 @@ let search_index = fun value array ->
let add_key = fun xml do_change keys ->
- let key, modifiers = GtkData.AccelGroup.parse (Xml.attrib xml "key")
+ let key, modifiers = GtkData.AccelGroup.parse (Pprz.key_modifiers_of_string (Xml.attrib xml "key"))
and value = ExtXml.float_attrib xml "value" in
keys := (key, (modifiers, fun () -> do_change value)) :: !keys
diff --git a/sw/lib/ocaml/pprz.ml b/sw/lib/ocaml/pprz.ml
index f2de6e2ff8..4ec72a256b 100644
--- a/sw/lib/ocaml/pprz.ml
+++ b/sw/lib/ocaml/pprz.ml
@@ -241,6 +241,17 @@ let alt_unit_coef_of_xml = fun ?auto xml ->
in
coef
+let key_modifiers_of_string = fun key ->
+ let key_split = Str.split (Str.regexp "[A-Za-z]+\\+") key in
+ let keys = List.map (fun k ->
+ match k with
+ | "Ctrl" -> ""
+ | "Alt" -> ""
+ | "Shift" -> ""
+ | "Meta" -> ""
+ | x -> x
+ ) key_split in
+ String.concat "" keys
let pipe_regexp = Str.regexp "|"
let field_of_xml = fun xml ->
diff --git a/sw/lib/ocaml/pprz.mli b/sw/lib/ocaml/pprz.mli
index 4181035fb0..0f47a307d2 100644
--- a/sw/lib/ocaml/pprz.mli
+++ b/sw/lib/ocaml/pprz.mli
@@ -109,6 +109,12 @@ val alt_unit_coef_of_xml : ?auto:string -> Xml.xml -> string
(** Return coef for alternate unit
*)
+val key_modifiers_of_string : string -> string
+(** Convert key modifiers from Qt style (without '<' or '>', separated with '+')
+ * to GTK style.
+ * Supported modifiers are Alt, Ctrl, Shift and Meta
+ *)
+
exception Unknown_msg_name of string * string
(** [Unknown_msg_name (name, class_name)] Raised if message [name] is not
found in class [class_name]. *)