Skip to content

Commit

Permalink
Add AltGr behavior option to layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Czibik committed Sep 9, 2021
1 parent 0b754df commit 7394d54
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Views/Layout.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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"));
Expand Down

0 comments on commit 7394d54

Please sign in to comment.