Mapping mouse buttons with udev hwdb












3















Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/



I've set up a config file:



$ lsusb | grep G500
Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
$ cat /etc/udev/hwdb.d/70-g500.hwdb
keyboard:usb:v046DpC068*
KEYBOARD_KEY_90009=9
KEYBOARD_KEY_9000a=8
KEYBOARD_KEY_90006=0


Based on the following evtest output:



Event: time 1422711060.272136, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1422711060.272136, type 1 (EV_KEY), code 280 (?), value 1
Event: time 1422711060.272136, -------------- EV_SYN ------------
Event: time 1422711060.432134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1422711060.432134, type 1 (EV_KEY), code 280 (?), value 0
Event: time 1422711060.432134, -------------- EV_SYN ------------
Event: time 1422711061.461191, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1422711061.461191, type 1 (EV_KEY), code 281 (?), value 1
Event: time 1422711061.461191, -------------- EV_SYN ------------
Event: time 1422711061.628125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1422711061.628125, type 1 (EV_KEY), code 281 (?), value 0
Event: time 1422711061.628125, -------------- EV_SYN ------------
Event: time 1422711062.725119, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1422711062.725119, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 1
Event: time 1422711062.725119, -------------- EV_SYN ------------
Event: time 1422711062.902137, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1422711062.902137, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 0


And yet I get no keypresses (Or change in evtest output) when I'm done.



(Yes I've done udevadm hwdb --update/trigger)










share|improve this question














bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    3















    Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/



    I've set up a config file:



    $ lsusb | grep G500
    Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
    $ cat /etc/udev/hwdb.d/70-g500.hwdb
    keyboard:usb:v046DpC068*
    KEYBOARD_KEY_90009=9
    KEYBOARD_KEY_9000a=8
    KEYBOARD_KEY_90006=0


    Based on the following evtest output:



    Event: time 1422711060.272136, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
    Event: time 1422711060.272136, type 1 (EV_KEY), code 280 (?), value 1
    Event: time 1422711060.272136, -------------- EV_SYN ------------
    Event: time 1422711060.432134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
    Event: time 1422711060.432134, type 1 (EV_KEY), code 280 (?), value 0
    Event: time 1422711060.432134, -------------- EV_SYN ------------
    Event: time 1422711061.461191, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
    Event: time 1422711061.461191, type 1 (EV_KEY), code 281 (?), value 1
    Event: time 1422711061.461191, -------------- EV_SYN ------------
    Event: time 1422711061.628125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
    Event: time 1422711061.628125, type 1 (EV_KEY), code 281 (?), value 0
    Event: time 1422711061.628125, -------------- EV_SYN ------------
    Event: time 1422711062.725119, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
    Event: time 1422711062.725119, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 1
    Event: time 1422711062.725119, -------------- EV_SYN ------------
    Event: time 1422711062.902137, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
    Event: time 1422711062.902137, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 0


    And yet I get no keypresses (Or change in evtest output) when I'm done.



    (Yes I've done udevadm hwdb --update/trigger)










    share|improve this question














    bumped to the homepage by Community 8 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      3












      3








      3








      Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/



      I've set up a config file:



      $ lsusb | grep G500
      Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
      $ cat /etc/udev/hwdb.d/70-g500.hwdb
      keyboard:usb:v046DpC068*
      KEYBOARD_KEY_90009=9
      KEYBOARD_KEY_9000a=8
      KEYBOARD_KEY_90006=0


      Based on the following evtest output:



      Event: time 1422711060.272136, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
      Event: time 1422711060.272136, type 1 (EV_KEY), code 280 (?), value 1
      Event: time 1422711060.272136, -------------- EV_SYN ------------
      Event: time 1422711060.432134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
      Event: time 1422711060.432134, type 1 (EV_KEY), code 280 (?), value 0
      Event: time 1422711060.432134, -------------- EV_SYN ------------
      Event: time 1422711061.461191, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
      Event: time 1422711061.461191, type 1 (EV_KEY), code 281 (?), value 1
      Event: time 1422711061.461191, -------------- EV_SYN ------------
      Event: time 1422711061.628125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
      Event: time 1422711061.628125, type 1 (EV_KEY), code 281 (?), value 0
      Event: time 1422711061.628125, -------------- EV_SYN ------------
      Event: time 1422711062.725119, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
      Event: time 1422711062.725119, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 1
      Event: time 1422711062.725119, -------------- EV_SYN ------------
      Event: time 1422711062.902137, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
      Event: time 1422711062.902137, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 0


      And yet I get no keypresses (Or change in evtest output) when I'm done.



      (Yes I've done udevadm hwdb --update/trigger)










      share|improve this question














      Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/



      I've set up a config file:



      $ lsusb | grep G500
      Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
      $ cat /etc/udev/hwdb.d/70-g500.hwdb
      keyboard:usb:v046DpC068*
      KEYBOARD_KEY_90009=9
      KEYBOARD_KEY_9000a=8
      KEYBOARD_KEY_90006=0


      Based on the following evtest output:



      Event: time 1422711060.272136, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
      Event: time 1422711060.272136, type 1 (EV_KEY), code 280 (?), value 1
      Event: time 1422711060.272136, -------------- EV_SYN ------------
      Event: time 1422711060.432134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
      Event: time 1422711060.432134, type 1 (EV_KEY), code 280 (?), value 0
      Event: time 1422711060.432134, -------------- EV_SYN ------------
      Event: time 1422711061.461191, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
      Event: time 1422711061.461191, type 1 (EV_KEY), code 281 (?), value 1
      Event: time 1422711061.461191, -------------- EV_SYN ------------
      Event: time 1422711061.628125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
      Event: time 1422711061.628125, type 1 (EV_KEY), code 281 (?), value 0
      Event: time 1422711061.628125, -------------- EV_SYN ------------
      Event: time 1422711062.725119, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
      Event: time 1422711062.725119, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 1
      Event: time 1422711062.725119, -------------- EV_SYN ------------
      Event: time 1422711062.902137, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
      Event: time 1422711062.902137, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 0


      And yet I get no keypresses (Or change in evtest output) when I'm done.



      (Yes I've done udevadm hwdb --update/trigger)







      udev






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 31 '15 at 14:00









      J VJ V

      19817




      19817





      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):



          udevadm hwdb --update
          udevadm control --reload


          and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.






          share|improve this answer
























          • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

            – J V
            Mar 23 '15 at 18:15











          • Does the timestamp on /etc/udev/hwdb.bin change after you update?

            – William Everett
            Mar 24 '15 at 19:30











          • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

            – Centimane
            Jun 24 '15 at 14:36











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f182176%2fmapping-mouse-buttons-with-udev-hwdb%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):



          udevadm hwdb --update
          udevadm control --reload


          and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.






          share|improve this answer
























          • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

            – J V
            Mar 23 '15 at 18:15











          • Does the timestamp on /etc/udev/hwdb.bin change after you update?

            – William Everett
            Mar 24 '15 at 19:30











          • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

            – Centimane
            Jun 24 '15 at 14:36
















          0














          I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):



          udevadm hwdb --update
          udevadm control --reload


          and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.






          share|improve this answer
























          • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

            – J V
            Mar 23 '15 at 18:15











          • Does the timestamp on /etc/udev/hwdb.bin change after you update?

            – William Everett
            Mar 24 '15 at 19:30











          • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

            – Centimane
            Jun 24 '15 at 14:36














          0












          0








          0







          I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):



          udevadm hwdb --update
          udevadm control --reload


          and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.






          share|improve this answer













          I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):



          udevadm hwdb --update
          udevadm control --reload


          and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 17 '15 at 21:08









          William EverettWilliam Everett

          310113




          310113













          • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

            – J V
            Mar 23 '15 at 18:15











          • Does the timestamp on /etc/udev/hwdb.bin change after you update?

            – William Everett
            Mar 24 '15 at 19:30











          • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

            – Centimane
            Jun 24 '15 at 14:36



















          • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

            – J V
            Mar 23 '15 at 18:15











          • Does the timestamp on /etc/udev/hwdb.bin change after you update?

            – William Everett
            Mar 24 '15 at 19:30











          • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

            – Centimane
            Jun 24 '15 at 14:36

















          I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

          – J V
          Mar 23 '15 at 18:15





          I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear.

          – J V
          Mar 23 '15 at 18:15













          Does the timestamp on /etc/udev/hwdb.bin change after you update?

          – William Everett
          Mar 24 '15 at 19:30





          Does the timestamp on /etc/udev/hwdb.bin change after you update?

          – William Everett
          Mar 24 '15 at 19:30













          @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

          – Centimane
          Jun 24 '15 at 14:36





          @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference.

          – Centimane
          Jun 24 '15 at 14:36


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f182176%2fmapping-mouse-buttons-with-udev-hwdb%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

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          濃尾地震