rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.42k stars 213 forks source link

Super confused about xkeysnail mappings #676

Closed joshgoebel closed 2 years ago

joshgoebel commented 2 years ago

I feel like I'm missing something... I see code like:

    # Enable Cmd+Shift+Braces for tab navigation
    K("RC-Shift-Left_Brace"):   K("C-Page_Up"),     # Go to prior tab
    K("RC-Shift-Right_Brace"):  K("C-Page_Down"),   # Go to next tab
    # Enable Cmd+Option+Left/Right for tab navigation
    K("RC-M-Left"):             K("C-Page_Up"),     # Go to prior tab
    K("RC-M-Right"):            K("C-Page_Down"),   # Go to next tab
    # Enable Ctrl+PgUp/PgDn for tab navigation
    K("Super-Page_Up"):         K("C-Page_Up"),     # Go to prior tab
    K("Super-Page_Down"):       K("C-Page_Down"),   # Go to next tab

Why is RC being used instead of "Super"... Super is the Cmd key. Then in the last set it says we're enabling Ctrl, but here we're referring to Super... I'm very confused as none of this is what I'd expect to see.

What am I missing?

rbreaves commented 2 years ago

Context would have helped but that’s the browser section & probably a contribution by AKredbear. I assume it’s correct.

Super technically being Cmd is irrelevant - Kinto doesn’t magically fix apps to treat Super like a cmd key - it moves Ctrl to the Cmd key position while placing Super on Ctrl & mapping Mac like Ctrl behavior to it.

Further complicated w/ terminals but same thing sorta. Much of this is explained in my novel known as a readme.

Also to note - the modifier key remaps happen well before the individual remaps per an app or category. You’ve got the GUI vs Terminal category remap & then literally everything else layered on top.

joshgoebel commented 2 years ago

Yeah I think what I was missing (because it's commented out) was:

define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
 # Key.LEFT_META: Key.RIGHT_CTRL,  # Mac
    # Key.LEFT_CTRL: Key.LEFT_META,   # Mac
})

And then you have code in one of your GUI pieces to uncomment those lines... first remapping META/super to Right Control... which is why you then have to refer to it as Right control later...

rbreaves commented 2 years ago

Yep! And it is literally the only reasonable way I could even conceive of going about this project at all. I feel like quite literally everyone that has ever tackled this problem before I came up with this approach were all asking for a serious bruising.

I mean what are you alternatives? Recompile core parts of the OS, applications even (when you can) or some other method? At the end of the day I am not trout that likes to swim against the current, I'll be lazy and let the river take me wherever it wants - but I will still steer and direct it so that it works with me and not against me.

I feel like that is what just about everyone else does in this "let's remap my keys to work like mac" field - while other approaches might be a little more direct and 1 to 1 it also means that it immediately starts breaking apart the moment you introduce a new app that you have never ran or explicitly created remaps for. It is at the core of why Kinto works and other attempts don't - other attempts can only ever work for specific individuals that run a very specific set of applications all day every day. That's just not how most people work or operate, even developers. We all try out new tools constantly and no one wants to create a new set of remaps for every single new app they run into lol.

rbreaves commented 2 years ago

@joshgoebel The installer of Kinto should guide you through a GUI interface which will ask you to press the 2nd key left of the spacebar - it is that part of the wizard which is to uncomment out the appropriate initial GUI vs Terminal modifier remaps. If this did not occur during the install then that would be something I would want to look at.

But yea - if you are just looking at the default kinto.py file pre install then there are things that are commented out until the actual install occurs.

Initially I was doing the entire install via the terminal and people find that too confusing because they had difficulty parsing if I was asking what they wanted to convert the keyboard to (even thought that was obvious lol) instead of it being me asking them what type of keyboard they currently hard. The GUI installer fixed all of that, there's no way to skip it really and no confusion on what its purpose is - worst thing that can happen is that the vte291 dependency might be missing on some distros that have not had support added yet.