diff --git a/docs/linux/keyman-config.md b/docs/linux/keyman-config.md index f575024832..93ed3ffd8b 100644 --- a/docs/linux/keyman-config.md +++ b/docs/linux/keyman-config.md @@ -38,8 +38,7 @@ pip3 install sentry-sdk Copy and compile the GSettings schema: ```bash -cd keyman_config -sudo cp com.keyman.gschema.xml /usr/share/glib-2.0/schemas +sudo cp linux/keyman-config/resources/com.keyman.gschema.xml /usr/share/glib-2.0/schemas sudo glib-compile-schemas /usr/share/glib-2.0/schemas ``` diff --git a/linux/keyman-config/keyman_config/options_widget.py b/linux/keyman-config/keyman_config/options_widget.py index 889483733e..7c08780bc3 100644 --- a/linux/keyman-config/keyman_config/options_widget.py +++ b/linux/keyman-config/keyman_config/options_widget.py @@ -7,6 +7,7 @@ gi.require_version('Gtk', '3.0') from gi.repository import Gtk from keyman_config import _ +from keyman_config.keyman_option import KeymanOption class OptionsWidget(Gtk.Box): @@ -17,11 +18,11 @@ class OptionsWidget(Gtk.Box): label.set_halign(Gtk.Align.START) self.pack_start(label, False, False, 10) - (enabled, reason) = sentry.is_sentry_enabled() + (sentry_enabled, reason) = sentry.is_sentry_enabled() disabledByVariable = sentry.is_sentry_disabled_by_variable() self.errorReportingButton = Gtk.CheckButton(_("Automatically report errors to keyman.com")) - self.errorReportingButton.set_active(enabled) + self.errorReportingButton.set_active(sentry_enabled) self.errorReportingButton.set_sensitive(not disabledByVariable) sentry.bind_checkbutton(self.errorReportingButton) self.pack_start(self.errorReportingButton, False, False, 0) @@ -32,3 +33,10 @@ class OptionsWidget(Gtk.Box): label.set_padding(25, 0) label.set_sensitive(False) self.pack_start(label, False, False, 0) + + self.simulate_altgr_option = KeymanOption('simulate-altgr') + self.simulate_altgr_enabled = self.simulate_altgr_option.get() + self.simulateAltGrButton = Gtk.CheckButton(_("Simulate AltGr with Ctrl + Alt")) + self.simulateAltGrButton.set_active(sentry_enabled) + self.simulate_altgr_option.bind_checkbutton(self.simulateAltGrButton) + self.pack_start(self.simulateAltGrButton, False, False, 0) diff --git a/linux/keyman-config/resources/com.keyman.gschema.xml b/linux/keyman-config/resources/com.keyman.gschema.xml index c286687f40..28262c6204 100644 --- a/linux/keyman-config/resources/com.keyman.gschema.xml +++ b/linux/keyman-config/resources/com.keyman.gschema.xml @@ -7,6 +7,12 @@ Automatic error reporting true to enable automatic reporting of errors to Sentry + + false + Simulate AltGr with Ctrl+Alt + true will allow Ctrl+Alt to be used for AltGr. If false + Ctrl+Alt will not be used to simulate the AltGr key. +