Apple Magic Keyboard key swap

Forum Forums General Software Apple Magic Keyboard key swap

  • This topic has 6 replies, 2 voices, and was last updated Sep 9-1:34 pm by Xecure.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #66742
    Member
    palacca

      Hi everyone,
      I’m new to Linux environment and just started to understand a bit of it with an installation of AntiX.
      I’m trying to connect my wireless apple magic keyboard via bluetooth and everything is fine, there’s only one error, as I type the vertical slash key the angle brackets are shown to screen instead.
      I get confused as with my usb wired kb (which has the same layout) the two keys aren’t swapped.
      I’m currently using the pc105, italian variant, keyboard layout.
      Does anyone have any idea about how to solve this error?
      Thanks for your time.

      • This topic was modified 1 year, 7 months ago by palacca.
      #66778
      Member
      Xecure
        Helpful
        Up
        1
        ::

        It seems that for apple magic keyboard it requires a special XKBOPTIONS option (based on it seems the signals are different”>this post).
        Based on the above linke, after connecting the bluetooth apple magic keyboard, try running in terminal
        setxkbmap -option apple:badmap
        and see if the keys are mapped OK now.

        There are a few posts related to this on the net. See if you can find anything related to “apple magic keyboard” and “debian”.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #66780
        Member
        palacca
          Helpful
          Up
          0
          ::

          Yes! It worked, thanks very much!

          #66781
          Member
          palacca
            Helpful
            Up
            0
            ::

            I’d have another question. Is there a way to set keyboard shortcuts to work as in MacOS (ex. cmd+w for closing tab), as I was previously used to them?

            #66783
            Member
            Xecure
              Helpful
              Up
              0
              ::

              I’d have another question. Is there a way to set keyboard shortcuts to work as in MacOS (ex. cmd+w for closing tab), as I was previously used to them?

              You need to add more options to the XKBOPTIONS variable.
              For cmd <=> Control switch (I think this is what you need), you need to also use the option “altwin2:cmd_n_ctrl”
              setxkbmap -option "apple:badmap,altwin2:cmd_n_ctrl"
              or add it to XKBOPTIONS in /etc/default/keyboard and restart.

              You can see all options available if you expand the Keyboard_selection table for live boot parameters (for “Option code – keyboard Options”). I initially created the table for live-usb but the codes are the same for XKBOPTIONS in installed.
              Ignore above. I never included any mac related keyboard options. Sorry for the misleading link.

              • This reply was modified 1 year, 7 months ago by Xecure.
              • This reply was modified 1 year, 7 months ago by Xecure.

              antiX Live system enthusiast.
              General Live Boot Parameters for antiX.

              #66788
              Member
              palacca
                Helpful
                Up
                0
                ::

                I tried that but it’s still not working, I still have to start shortcuts with ctrl.

                #66793
                Member
                Xecure
                  Helpful
                  Up
                  0
                  ::

                  Not sure then. I don’t have any apple keyboard to test myself what is the ideal option.
                  The posts I found on the net are a bit too complicated to recommend and seem to make it difficult to revert them.
                  The simple method, like the one in this question, seem to use different setxkbmap options to achieve the “same result”, but they never confirm if this worked at all.

                  If you figure it out, and have a bit of time, please share the solution here so that others may benefit.

                  • This reply was modified 1 year, 7 months ago by Xecure.

                  antiX Live system enthusiast.
                  General Live Boot Parameters for antiX.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.