xkb mapping of R_Control+Arrows

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












Have a laptop with directional Arrow keys and Fn + Arrows for PageUp/PageDown/Home/End. Want to make those keys such that the Right Control changes them to:




  • RCtrl + Up -> Page Up


  • RCtrl + Down -> Page Down


  • RCtrl + Left -> Ctrl + Page Up


  • RCtrl + Right -> Ctrl + Page Down

Left control should continue to work as before.



XKB that is close to working:



The following content is saved to /usr/share/X11/xkb/symbols/custom and loaded via this command setxkbmap -symbols "pc+us+inet(evdev)+custom":



key <UP> 
type= "PC_CONTROL_LEVEL2",
symbols[Group1]= [ Up, NoSymbol ],
actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>, clearMods=Control)] ;
key <DOWN>
type= "PC_CONTROL_LEVEL2",
symbols[Group1]= [ Down, NoSymbol ],
actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>, clearMods=Control)] ;
key <LEFT>
type= "PC_CONTROL_LEVEL2",
symbols[Group1]= [ Left, NoSymbol ],
actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>)] ;
key <RGHT>
type= "PC_CONTROL_LEVEL2",
symbols[Group1]= [ Right, NoSymbol ],
actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>)] ;


The Problem:



Unfortunately the script above captures both Control keys, not only the right one. I need the left Control key to not change it's behavior. Changing the PC_CONTROL_LEVEL2 -> PC_RCONTROL_LEVEL2 looks like it should work, but nothing works differently in that case (as if I hadn't made any changes).



Any ideas why PC_RCONTROL_LEVEL2 doesn't do anything?



I have tried bumbling around all sorts of different things, but unfortunately nothing has worked. I can't even seem to keep the right control key from acting as a control key, even after trying to map it directly to another key.



I am currently running Ubuntu 17.10 w/ the default GNOME interface. Thanks!










share|improve this question



























    up vote
    2
    down vote

    favorite












    Have a laptop with directional Arrow keys and Fn + Arrows for PageUp/PageDown/Home/End. Want to make those keys such that the Right Control changes them to:




    • RCtrl + Up -> Page Up


    • RCtrl + Down -> Page Down


    • RCtrl + Left -> Ctrl + Page Up


    • RCtrl + Right -> Ctrl + Page Down

    Left control should continue to work as before.



    XKB that is close to working:



    The following content is saved to /usr/share/X11/xkb/symbols/custom and loaded via this command setxkbmap -symbols "pc+us+inet(evdev)+custom":



    key <UP> 
    type= "PC_CONTROL_LEVEL2",
    symbols[Group1]= [ Up, NoSymbol ],
    actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>, clearMods=Control)] ;
    key <DOWN>
    type= "PC_CONTROL_LEVEL2",
    symbols[Group1]= [ Down, NoSymbol ],
    actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>, clearMods=Control)] ;
    key <LEFT>
    type= "PC_CONTROL_LEVEL2",
    symbols[Group1]= [ Left, NoSymbol ],
    actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>)] ;
    key <RGHT>
    type= "PC_CONTROL_LEVEL2",
    symbols[Group1]= [ Right, NoSymbol ],
    actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>)] ;


    The Problem:



    Unfortunately the script above captures both Control keys, not only the right one. I need the left Control key to not change it's behavior. Changing the PC_CONTROL_LEVEL2 -> PC_RCONTROL_LEVEL2 looks like it should work, but nothing works differently in that case (as if I hadn't made any changes).



    Any ideas why PC_RCONTROL_LEVEL2 doesn't do anything?



    I have tried bumbling around all sorts of different things, but unfortunately nothing has worked. I can't even seem to keep the right control key from acting as a control key, even after trying to map it directly to another key.



    I am currently running Ubuntu 17.10 w/ the default GNOME interface. Thanks!










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      Have a laptop with directional Arrow keys and Fn + Arrows for PageUp/PageDown/Home/End. Want to make those keys such that the Right Control changes them to:




      • RCtrl + Up -> Page Up


      • RCtrl + Down -> Page Down


      • RCtrl + Left -> Ctrl + Page Up


      • RCtrl + Right -> Ctrl + Page Down

      Left control should continue to work as before.



      XKB that is close to working:



      The following content is saved to /usr/share/X11/xkb/symbols/custom and loaded via this command setxkbmap -symbols "pc+us+inet(evdev)+custom":



      key <UP> 
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Up, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>, clearMods=Control)] ;
      key <DOWN>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Down, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>, clearMods=Control)] ;
      key <LEFT>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Left, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>)] ;
      key <RGHT>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Right, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>)] ;


      The Problem:



      Unfortunately the script above captures both Control keys, not only the right one. I need the left Control key to not change it's behavior. Changing the PC_CONTROL_LEVEL2 -> PC_RCONTROL_LEVEL2 looks like it should work, but nothing works differently in that case (as if I hadn't made any changes).



      Any ideas why PC_RCONTROL_LEVEL2 doesn't do anything?



      I have tried bumbling around all sorts of different things, but unfortunately nothing has worked. I can't even seem to keep the right control key from acting as a control key, even after trying to map it directly to another key.



      I am currently running Ubuntu 17.10 w/ the default GNOME interface. Thanks!










      share|improve this question















      Have a laptop with directional Arrow keys and Fn + Arrows for PageUp/PageDown/Home/End. Want to make those keys such that the Right Control changes them to:




      • RCtrl + Up -> Page Up


      • RCtrl + Down -> Page Down


      • RCtrl + Left -> Ctrl + Page Up


      • RCtrl + Right -> Ctrl + Page Down

      Left control should continue to work as before.



      XKB that is close to working:



      The following content is saved to /usr/share/X11/xkb/symbols/custom and loaded via this command setxkbmap -symbols "pc+us+inet(evdev)+custom":



      key <UP> 
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Up, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>, clearMods=Control)] ;
      key <DOWN>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Down, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>, clearMods=Control)] ;
      key <LEFT>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Left, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGUP>)] ;
      key <RGHT>
      type= "PC_CONTROL_LEVEL2",
      symbols[Group1]= [ Right, NoSymbol ],
      actions[Group1] = [NoAction(), RedirectKey(key=<PGDN>)] ;


      The Problem:



      Unfortunately the script above captures both Control keys, not only the right one. I need the left Control key to not change it's behavior. Changing the PC_CONTROL_LEVEL2 -> PC_RCONTROL_LEVEL2 looks like it should work, but nothing works differently in that case (as if I hadn't made any changes).



      Any ideas why PC_RCONTROL_LEVEL2 doesn't do anything?



      I have tried bumbling around all sorts of different things, but unfortunately nothing has worked. I can't even seem to keep the right control key from acting as a control key, even after trying to map it directly to another key.



      I am currently running Ubuntu 17.10 w/ the default GNOME interface. Thanks!







      17.10 keyboard-layout xkb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 10 at 0:16









      galoget

      2,1062820




      2,1062820










      asked Mar 8 at 21:13









      JasonB42

      111




      111

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013228%2fxkb-mapping-of-r-controlarrows%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013228%2fxkb-mapping-of-r-controlarrows%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Which professions warranted travel in Medieval times?

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          Trouble downloading packages list due to a “Hash sum mismatch” error