1. 27
  1.  

  2. 4

    The Linux ecosystem can and should do better.

    Yes. I love working on Linux desktops but key bindings are one of my 2 pet peeves. Right now I’m using xmodmap and while it is flexible, it randomly loses the remap during work.

    The other one is setting default applications, this is a million times easier on Windows.

    1. 3

      randomly loses the remap during work

      Just a stupid guess: is there any chance it is correlated with adding/removing/reconnecting the keyboard? Not sure how to detect the last case, of course…

      1. 1

        No, I don’t reconnect it most days and I’ve never noticed any other oddity. :(

        1. 2

          Did you check dmesg to make sure something doesn’t randomly decide to drop everything and reenumerate? I definitely have seen USB hubs reinitialise for no clear reason (or maybe some power negotiation went wrong)

      2. 2

        Instead of xmodmap, you might want to look into QMK. In addition to modifying keys via keyboard fimware, it lets you add “layers” to your keyboard to get a more modal approach.

        You can switch the main alphabetical section of your keyboard between alphabet, numeric+function, arrow keys + home/pg{up,down}/ins/del, etc.

        1. 1

          I know about QMK but I didn’t know it can work with generic keyboards that don’t have QMK support per se, if I’m understanding you correctly. Will have another look but I don’t want to change/brick this keyboard :)

        2. 1

          and alas xmodmap won’t help you on wayland, either. I rely upon Xcompose a lot myself, same issue.

          1. 1

            Right now I’m using xmodmap and while it is flexible, it randomly loses the remap during work.

            You should report this as a bug. I’ve never experienced it.

            1. 2

              As some other commenter mentioned it’s not a common problem. Also I have talked to several xmodmap users and no one ever had that, so I’m pretty sure it’s some weird interaction of something resetting it actively. I don’t know where to report it as I don’t know the culprit. (I’ve originally used someone else’s config, and it worked on other machines so I don’t think xmodmap is doing it itself)

            2. 1

              Right now I’m using xmodmap and while it is flexible, it randomly loses the remap during work.

              Maybe it is interfering with your window manager?

              I’m using xmodmap too, but haven’t encountered any glitches yet.

              1. 1

                Yeah I thought about it but I’ve been having the same problem on 2 different machines with different complete reinstalls, and ofc different versions of i3. Could still be i3, of course…

            3. 2

              I ended up writing my own more generalized solution to remapping keys per application. It was originally written to do this specifically but I found other uses for it.

              http://github.com/classilla/appmodmap

              1. 2

                I’ve been down a parallel road to this - the Control key has enough of an established usage for me when using the shell (which features in ~80% of my computer time) that I don’t see why I’d want to overload it as a gui shortcut key when Alt is sitting there largely unused).

                The article doesn’t mention Firefox (possibly because the author doesn’t use it). If it doesn’t use the Gtk settings - I haven’t checked, because I didn’t know about them (thanks!) - you can switch it from Control to Alt by changing the “ui.key.accelKey” preference to 18. I do this by dropping a user.js file in my profile directory containing the line

                user_pref("ui.key.accelKey", 18); # use Alt instead of Ctrl
                
                1. 1

                  As a person who flips back and forth between a Mac laptop and a Linux machine with a mac keyboard several times a day, this is something that is very interesting to me.

                  1. 1

                    I’ve wondered the history of this. Why did people overload the copy paste when guis came around? Was it to try and make switching from windows easier? Or was this an old Unix thing from the corporations or research labs?

                    It just seems like a conflation that would be obviously a bad idea.

                    1. 8

                      The Macintosh I believe was the first with these bindings, and it didn’t have a CLI until X, full stop. I believe the early ones didn’t have a control key either, but a separate one was added later.

                      When Windows came onto the scene, it copied the most of Macintosh’s shortcut bindings, but they were using Alt for accelerators, so the only spare modifier then was Control. Windows had DOS in a window, but people expected all their keys to work for familiar applications, so on Windows they didn’t add any GUI bindings except for ones on Alt.

                      X11 applications later copied Windows thoughtlessly and slavishly (before, they just did their own Athena-world thing), including the keybinds… even if it was problematic with running other Unix software in a virtual terminal.