From 7394d547beeaaec1e3f4c884632f2f2561179ca1 Mon Sep 17 00:00:00 2001 From: Peter Czibik Date: Thu, 9 Sep 2021 15:26:53 +0000 Subject: [PATCH] Add AltGr behavior option to layout --- src/Views/Layout.vala | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Views/Layout.vala b/src/Views/Layout.vala index b101950a6..6ebfb43c9 100644 --- a/src/Views/Layout.vala +++ b/src/Views/Layout.vala @@ -110,6 +110,18 @@ namespace Pantheon.Keyboard { korean_layouts_panel (), third_level_layouts_panel ()}; + var alt_gr_label = new SettingsLabel (_("AltGr behavior:"), size_group[0]); + + // AltGr key functionality + modifier = new XkbModifier (); + modifier.append_xkb_option ("", _("Default")); + modifier.append_xkb_option ("ctrl:ralt_rctrl", _("as Ctrl")); + + modifier.set_default_command (""); + settings.add_xkb_modifier (modifier); + + var alt_gr_combo = new XkbComboBox (modifier, size_group[1]); + advanced_settings = new AdvancedSettings (panels); entry_test = new Gtk.Entry () { @@ -131,7 +143,9 @@ namespace Pantheon.Keyboard { attach (overlay_key_combo, 2, 2, 1, 1); attach (caps_lock_label, 1, 3, 1, 1); attach (caps_lock_combo, 2, 3, 1, 1); - attach (advanced_settings, 1, 4, 2); + attach (alt_gr_label, 1, 4, 1, 1); + attach (alt_gr_combo, 2, 4, 1, 1); + attach (advanced_settings, 1, 5, 2); if (GLib.SettingsSchemaSource.get_default ().lookup ("io.elementary.wingpanel.keyboard", true) != null) { var indicator_header = new Granite.HeaderLabel (_("Show in Panel"));