5

I am using a custom keyboard layout and custom options not supported through the Settings > Keyboard GUI. My workaround to this is to create a script that sets the layout and its options with:

setxkbmap my_layout -option 'shift:both_capslock_cancel,grp:caps_switch,grp_led:scroll'

I have this script executed on session startup (added through the Settings -> Applications -> Startup GUI).

The issue I have is that when locking and unlocking the system, or when opening the Keyboard settings panel, the layout and options are reset to those set through the GUI.

Is there any way to prevent the layout from being reset every time?

1 Answer 1

2

This is supposed to prevent the system from resetting keyboard settings:

gsettings set org.gnome.settings-daemon.plugins.keyboard active false

(Better reboot first to check if it works.)

If that does not work, check out this question (which provides some attempts to permamently change xkb options) and its answers on AskUbuntu: "Permanently set keyboard layout options with setxkbmap in gnome/unity" (elementary is neither Gnome nor Unity, but it should work similar in the backend.)

1
  • 1
    This worked perfectly for me. I have updated the question to be related to my original problem (rather than my hoped for solution) so that this answer perfectly fits. Thank you.
    – dom_watson
    Commented Sep 4, 2015 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.