How can I apply xkb symbols when Xorg starts?












0















I want X to launch with my customized XKB keymap applied.



I have an xkb symbols file named hyper, which maps the Hyper key to the right control key. I put this in /usr/share/X11/xkb/symbols/hyper. Contents:



partial modifier_keys
xkb_symbols "right_control" {
key <RCTL> { [ Hyper_R ] };

include "hyper(base)"
};

// I might want hyper on a different key, which needs the same modifier setup
partial modifier_keys
xkb_symbols "base" {
modifier_map Control { <LCTL> };
modifier_map Mod1 { <LALT>, <RALT> };
modifier_map Mod3 { Hyper_L, Hyper_R };
modifier_map Mod4 { <LWIN>, <RWIN> };
};


I also have a keymap file:



xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)" };
xkb_geometry { include "pc(pc105)" };
};


If I run xkbcomp keymap-file, everything remaps exactly how I want, so I know this part works. However, I can't get this to apply when X starts up.



I have the following snippet in /etc/X11/xorg.conf.d/10-xps13-keyboard.conf:



Section "InputClass"
Identifier "Dell XPS13 Keyboard"
MatchIsKeyboard "on"

Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
EndSection


And I see the options being applied in the server log:



[ 11469.810] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
[ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "Dell XPS13 Keyboard"
[ 11469.810] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[ 11469.811] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 30 paused 0
[ 11469.811] Option "_source" "server/udev"
[ 11469.811] Option "name" "AT Translated Set 2 keyboard"
[ 11469.811] Option "path" "/dev/input/event0"
[ 11469.811] Option "device" "/dev/input/event0"
[ 11469.811] Option "major" "13"
[ 11469.811] Option "minor" "64"
[ 11469.811] Option "xkb_layout" "us"
[ 11469.811] Option "xkb_model" "pc105"
[ 11469.811] Option "xkb_options" "ctrl:nocaps"
[ 11469.811] Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
[ 11469.811] Option "driver" "libinput"
[ 11469.811] Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
[ 11469.811] Option "fd" "30"


However, the keymap is not loaded when X starts.



I assume that xkb_symbols is the wrong Option, but libinput(4) doesn't mention keyboards at all, so I don't know what Options are available.



I'm running Debian stretch.










share|improve this question



























    0















    I want X to launch with my customized XKB keymap applied.



    I have an xkb symbols file named hyper, which maps the Hyper key to the right control key. I put this in /usr/share/X11/xkb/symbols/hyper. Contents:



    partial modifier_keys
    xkb_symbols "right_control" {
    key <RCTL> { [ Hyper_R ] };

    include "hyper(base)"
    };

    // I might want hyper on a different key, which needs the same modifier setup
    partial modifier_keys
    xkb_symbols "base" {
    modifier_map Control { <LCTL> };
    modifier_map Mod1 { <LALT>, <RALT> };
    modifier_map Mod3 { Hyper_L, Hyper_R };
    modifier_map Mod4 { <LWIN>, <RWIN> };
    };


    I also have a keymap file:



    xkb_keymap {
    xkb_keycodes { include "evdev+aliases(qwerty)" };
    xkb_types { include "complete" };
    xkb_compat { include "complete" };
    xkb_symbols { include "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)" };
    xkb_geometry { include "pc(pc105)" };
    };


    If I run xkbcomp keymap-file, everything remaps exactly how I want, so I know this part works. However, I can't get this to apply when X starts up.



    I have the following snippet in /etc/X11/xorg.conf.d/10-xps13-keyboard.conf:



    Section "InputClass"
    Identifier "Dell XPS13 Keyboard"
    MatchIsKeyboard "on"

    Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
    EndSection


    And I see the options being applied in the server log:



    [ 11469.810] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
    [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
    [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "Dell XPS13 Keyboard"
    [ 11469.810] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
    [ 11469.811] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 30 paused 0
    [ 11469.811] Option "_source" "server/udev"
    [ 11469.811] Option "name" "AT Translated Set 2 keyboard"
    [ 11469.811] Option "path" "/dev/input/event0"
    [ 11469.811] Option "device" "/dev/input/event0"
    [ 11469.811] Option "major" "13"
    [ 11469.811] Option "minor" "64"
    [ 11469.811] Option "xkb_layout" "us"
    [ 11469.811] Option "xkb_model" "pc105"
    [ 11469.811] Option "xkb_options" "ctrl:nocaps"
    [ 11469.811] Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
    [ 11469.811] Option "driver" "libinput"
    [ 11469.811] Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
    [ 11469.811] Option "fd" "30"


    However, the keymap is not loaded when X starts.



    I assume that xkb_symbols is the wrong Option, but libinput(4) doesn't mention keyboards at all, so I don't know what Options are available.



    I'm running Debian stretch.










    share|improve this question

























      0












      0








      0








      I want X to launch with my customized XKB keymap applied.



      I have an xkb symbols file named hyper, which maps the Hyper key to the right control key. I put this in /usr/share/X11/xkb/symbols/hyper. Contents:



      partial modifier_keys
      xkb_symbols "right_control" {
      key <RCTL> { [ Hyper_R ] };

      include "hyper(base)"
      };

      // I might want hyper on a different key, which needs the same modifier setup
      partial modifier_keys
      xkb_symbols "base" {
      modifier_map Control { <LCTL> };
      modifier_map Mod1 { <LALT>, <RALT> };
      modifier_map Mod3 { Hyper_L, Hyper_R };
      modifier_map Mod4 { <LWIN>, <RWIN> };
      };


      I also have a keymap file:



      xkb_keymap {
      xkb_keycodes { include "evdev+aliases(qwerty)" };
      xkb_types { include "complete" };
      xkb_compat { include "complete" };
      xkb_symbols { include "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)" };
      xkb_geometry { include "pc(pc105)" };
      };


      If I run xkbcomp keymap-file, everything remaps exactly how I want, so I know this part works. However, I can't get this to apply when X starts up.



      I have the following snippet in /etc/X11/xorg.conf.d/10-xps13-keyboard.conf:



      Section "InputClass"
      Identifier "Dell XPS13 Keyboard"
      MatchIsKeyboard "on"

      Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
      EndSection


      And I see the options being applied in the server log:



      [ 11469.810] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
      [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
      [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "Dell XPS13 Keyboard"
      [ 11469.810] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
      [ 11469.811] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 30 paused 0
      [ 11469.811] Option "_source" "server/udev"
      [ 11469.811] Option "name" "AT Translated Set 2 keyboard"
      [ 11469.811] Option "path" "/dev/input/event0"
      [ 11469.811] Option "device" "/dev/input/event0"
      [ 11469.811] Option "major" "13"
      [ 11469.811] Option "minor" "64"
      [ 11469.811] Option "xkb_layout" "us"
      [ 11469.811] Option "xkb_model" "pc105"
      [ 11469.811] Option "xkb_options" "ctrl:nocaps"
      [ 11469.811] Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
      [ 11469.811] Option "driver" "libinput"
      [ 11469.811] Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
      [ 11469.811] Option "fd" "30"


      However, the keymap is not loaded when X starts.



      I assume that xkb_symbols is the wrong Option, but libinput(4) doesn't mention keyboards at all, so I don't know what Options are available.



      I'm running Debian stretch.










      share|improve this question














      I want X to launch with my customized XKB keymap applied.



      I have an xkb symbols file named hyper, which maps the Hyper key to the right control key. I put this in /usr/share/X11/xkb/symbols/hyper. Contents:



      partial modifier_keys
      xkb_symbols "right_control" {
      key <RCTL> { [ Hyper_R ] };

      include "hyper(base)"
      };

      // I might want hyper on a different key, which needs the same modifier setup
      partial modifier_keys
      xkb_symbols "base" {
      modifier_map Control { <LCTL> };
      modifier_map Mod1 { <LALT>, <RALT> };
      modifier_map Mod3 { Hyper_L, Hyper_R };
      modifier_map Mod4 { <LWIN>, <RWIN> };
      };


      I also have a keymap file:



      xkb_keymap {
      xkb_keycodes { include "evdev+aliases(qwerty)" };
      xkb_types { include "complete" };
      xkb_compat { include "complete" };
      xkb_symbols { include "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)" };
      xkb_geometry { include "pc(pc105)" };
      };


      If I run xkbcomp keymap-file, everything remaps exactly how I want, so I know this part works. However, I can't get this to apply when X starts up.



      I have the following snippet in /etc/X11/xorg.conf.d/10-xps13-keyboard.conf:



      Section "InputClass"
      Identifier "Dell XPS13 Keyboard"
      MatchIsKeyboard "on"

      Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
      EndSection


      And I see the options being applied in the server log:



      [ 11469.810] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
      [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
      [ 11469.810] (**) AT Translated Set 2 keyboard: Applying InputClass "Dell XPS13 Keyboard"
      [ 11469.810] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
      [ 11469.811] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 30 paused 0
      [ 11469.811] Option "_source" "server/udev"
      [ 11469.811] Option "name" "AT Translated Set 2 keyboard"
      [ 11469.811] Option "path" "/dev/input/event0"
      [ 11469.811] Option "device" "/dev/input/event0"
      [ 11469.811] Option "major" "13"
      [ 11469.811] Option "minor" "64"
      [ 11469.811] Option "xkb_layout" "us"
      [ 11469.811] Option "xkb_model" "pc105"
      [ 11469.811] Option "xkb_options" "ctrl:nocaps"
      [ 11469.811] Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
      [ 11469.811] Option "driver" "libinput"
      [ 11469.811] Option "xkb_symbols" "pc+us+inet(evdev)+ctrl(nocaps)+hyper(right_control)"
      [ 11469.811] Option "fd" "30"


      However, the keymap is not loaded when X starts.



      I assume that xkb_symbols is the wrong Option, but libinput(4) doesn't mention keyboards at all, so I don't know what Options are available.



      I'm running Debian stretch.







      xorg xkb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 22 '18 at 7:31









      ieureieure

      1011




      1011






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386875%2fhow-can-i-apply-xkb-symbols-when-xorg-starts%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386875%2fhow-can-i-apply-xkb-symbols-when-xorg-starts%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          Алькесар

          Josef Freinademetz