Remap an apparently non-standard multimedia key

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











up vote
0
down vote

favorite












The key in my keyboard that's supposed to works as XF86AudioMedia —through an Fn key combination— doesn't open the default music player in Linux, but in Windows it works, opening the Windows media player.



As far as I can see xev output doesn't show nothing, evtest and showkey identifies it as 171 but remapping that code with xmodmap doesn't nothing.



If it's useful, my keyboard is a Blackweb BWK2T (MOSART Semi. 2.4G Wireless Keyboard according to evtest).



xev output:



MappingNotify event, serial 37, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 37, synthetic NO, window 0x4e00001,
mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 38, synthetic NO, window 0x4e00001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


evtest output:



Event: time 1512613277.517833, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1512613277.517833, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 1
Event: time 1512613277.517833, -------------- SYN_REPORT ------------
Event: time 1512613277.725803, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
Event: time 1512613277.725803, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 0
Event: time 1512613277.725803, -------------- SYN_REPORT ------------






share|improve this question
























    up vote
    0
    down vote

    favorite












    The key in my keyboard that's supposed to works as XF86AudioMedia —through an Fn key combination— doesn't open the default music player in Linux, but in Windows it works, opening the Windows media player.



    As far as I can see xev output doesn't show nothing, evtest and showkey identifies it as 171 but remapping that code with xmodmap doesn't nothing.



    If it's useful, my keyboard is a Blackweb BWK2T (MOSART Semi. 2.4G Wireless Keyboard according to evtest).



    xev output:



    MappingNotify event, serial 37, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

    FocusOut event, serial 37, synthetic NO, window 0x4e00001,
    mode NotifyGrab, detail NotifyAncestor

    FocusIn event, serial 38, synthetic NO, window 0x4e00001,
    mode NotifyUngrab, detail NotifyAncestor

    KeymapNotify event, serial 38, synthetic NO, window 0x0,
    keys: 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


    evtest output:



    Event: time 1512613277.517833, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
    Event: time 1512613277.517833, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 1
    Event: time 1512613277.517833, -------------- SYN_REPORT ------------
    Event: time 1512613277.725803, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
    Event: time 1512613277.725803, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 0
    Event: time 1512613277.725803, -------------- SYN_REPORT ------------






    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      The key in my keyboard that's supposed to works as XF86AudioMedia —through an Fn key combination— doesn't open the default music player in Linux, but in Windows it works, opening the Windows media player.



      As far as I can see xev output doesn't show nothing, evtest and showkey identifies it as 171 but remapping that code with xmodmap doesn't nothing.



      If it's useful, my keyboard is a Blackweb BWK2T (MOSART Semi. 2.4G Wireless Keyboard according to evtest).



      xev output:



      MappingNotify event, serial 37, synthetic NO, window 0x0,
      request MappingKeyboard, first_keycode 8, count 248

      FocusOut event, serial 37, synthetic NO, window 0x4e00001,
      mode NotifyGrab, detail NotifyAncestor

      FocusIn event, serial 38, synthetic NO, window 0x4e00001,
      mode NotifyUngrab, detail NotifyAncestor

      KeymapNotify event, serial 38, synthetic NO, window 0x0,
      keys: 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


      evtest output:



      Event: time 1512613277.517833, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
      Event: time 1512613277.517833, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 1
      Event: time 1512613277.517833, -------------- SYN_REPORT ------------
      Event: time 1512613277.725803, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
      Event: time 1512613277.725803, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 0
      Event: time 1512613277.725803, -------------- SYN_REPORT ------------






      share|improve this question












      The key in my keyboard that's supposed to works as XF86AudioMedia —through an Fn key combination— doesn't open the default music player in Linux, but in Windows it works, opening the Windows media player.



      As far as I can see xev output doesn't show nothing, evtest and showkey identifies it as 171 but remapping that code with xmodmap doesn't nothing.



      If it's useful, my keyboard is a Blackweb BWK2T (MOSART Semi. 2.4G Wireless Keyboard according to evtest).



      xev output:



      MappingNotify event, serial 37, synthetic NO, window 0x0,
      request MappingKeyboard, first_keycode 8, count 248

      FocusOut event, serial 37, synthetic NO, window 0x4e00001,
      mode NotifyGrab, detail NotifyAncestor

      FocusIn event, serial 38, synthetic NO, window 0x4e00001,
      mode NotifyUngrab, detail NotifyAncestor

      KeymapNotify event, serial 38, synthetic NO, window 0x0,
      keys: 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


      evtest output:



      Event: time 1512613277.517833, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
      Event: time 1512613277.517833, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 1
      Event: time 1512613277.517833, -------------- SYN_REPORT ------------
      Event: time 1512613277.725803, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183
      Event: time 1512613277.725803, type 1 (EV_KEY), code 171 (KEY_CONFIG), value 0
      Event: time 1512613277.725803, -------------- SYN_REPORT ------------








      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 7 '17 at 3:13









      Lupo

      12




      12




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Partial answer:



          The FocusOut and FocusIn events mean that some other application, possibly your window manager, is grabbing the event because it wants to react on it (e.g. launch some action associated with this key).



          KEY_CONFIG looks like the kernel input level mapping is wrong for your keyboard, so trying to remap it is the right idea. Note that xmodmap won't work if you are using Wayland, and not an X server. Also note that there's an offset (IIRC 8) between the input level key codes, and the key codes X uses.



          Suggestion: Try to remap some other key first (e.g. a to b) to see how it works, then map your 171 to XF86AudioMedia. You'll still need to make sure that your desktop, your window manager or whoever is responsible on your system launches a media player, possibly by configuring it.






          share|improve this answer




















          • I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
            – Lupo
            Dec 7 '17 at 23:10











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f409364%2fremap-an-apparently-non-standard-multimedia-key%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Partial answer:



          The FocusOut and FocusIn events mean that some other application, possibly your window manager, is grabbing the event because it wants to react on it (e.g. launch some action associated with this key).



          KEY_CONFIG looks like the kernel input level mapping is wrong for your keyboard, so trying to remap it is the right idea. Note that xmodmap won't work if you are using Wayland, and not an X server. Also note that there's an offset (IIRC 8) between the input level key codes, and the key codes X uses.



          Suggestion: Try to remap some other key first (e.g. a to b) to see how it works, then map your 171 to XF86AudioMedia. You'll still need to make sure that your desktop, your window manager or whoever is responsible on your system launches a media player, possibly by configuring it.






          share|improve this answer




















          • I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
            – Lupo
            Dec 7 '17 at 23:10















          up vote
          0
          down vote













          Partial answer:



          The FocusOut and FocusIn events mean that some other application, possibly your window manager, is grabbing the event because it wants to react on it (e.g. launch some action associated with this key).



          KEY_CONFIG looks like the kernel input level mapping is wrong for your keyboard, so trying to remap it is the right idea. Note that xmodmap won't work if you are using Wayland, and not an X server. Also note that there's an offset (IIRC 8) between the input level key codes, and the key codes X uses.



          Suggestion: Try to remap some other key first (e.g. a to b) to see how it works, then map your 171 to XF86AudioMedia. You'll still need to make sure that your desktop, your window manager or whoever is responsible on your system launches a media player, possibly by configuring it.






          share|improve this answer




















          • I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
            – Lupo
            Dec 7 '17 at 23:10













          up vote
          0
          down vote










          up vote
          0
          down vote









          Partial answer:



          The FocusOut and FocusIn events mean that some other application, possibly your window manager, is grabbing the event because it wants to react on it (e.g. launch some action associated with this key).



          KEY_CONFIG looks like the kernel input level mapping is wrong for your keyboard, so trying to remap it is the right idea. Note that xmodmap won't work if you are using Wayland, and not an X server. Also note that there's an offset (IIRC 8) between the input level key codes, and the key codes X uses.



          Suggestion: Try to remap some other key first (e.g. a to b) to see how it works, then map your 171 to XF86AudioMedia. You'll still need to make sure that your desktop, your window manager or whoever is responsible on your system launches a media player, possibly by configuring it.






          share|improve this answer












          Partial answer:



          The FocusOut and FocusIn events mean that some other application, possibly your window manager, is grabbing the event because it wants to react on it (e.g. launch some action associated with this key).



          KEY_CONFIG looks like the kernel input level mapping is wrong for your keyboard, so trying to remap it is the right idea. Note that xmodmap won't work if you are using Wayland, and not an X server. Also note that there's an offset (IIRC 8) between the input level key codes, and the key codes X uses.



          Suggestion: Try to remap some other key first (e.g. a to b) to see how it works, then map your 171 to XF86AudioMedia. You'll still need to make sure that your desktop, your window manager or whoever is responsible on your system launches a media player, possibly by configuring it.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 7 '17 at 9:22









          dirkt

          14.2k2931




          14.2k2931











          • I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
            – Lupo
            Dec 7 '17 at 23:10

















          • I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
            – Lupo
            Dec 7 '17 at 23:10
















          I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
          – Lupo
          Dec 7 '17 at 23:10





          I thought xmodmap uses different values, I didn't know it was just an offset. With the "corrected" keycode (179 for KEY_CONFIG / XF86Tools) I remap it with xmodmap to XF86AudioMedia and now works as expected. I'll try to do with setkeycodes and then edit the question to add this and mark it as solved.
          – Lupo
          Dec 7 '17 at 23:10


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409364%2fremap-an-apparently-non-standard-multimedia-key%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?