jgosmann / Karabiner-Elements-Neo

Neo2 Layer 4/6 for macOS Sierra
The Unlicense
33 stars 5 forks source link

Shift + layer 4 cursor keys not working #2

Closed jgosmann closed 7 years ago

jgosmann commented 7 years ago

From [this comment]():

CapsLock/Right Cmd + qwerty-asdf are the cursor keys. But adding shift to select text does not work, but did before.

I should check whether other keys in layer 4 might be useful with the shift modifier.

tjanson commented 7 years ago

Similarly, Cmd+⌫ (backspace, though possibly labeled delete) is used to delete files in Finder, but Cmd+Mod4+V (Neo) (i.e., Cmd+Layer4Backspace) triggers Cmd+V instead.

I guess the underlying mechanism is the same as for shift.

I suppose in theory any key from the upper layers could be combined with Cmd, or at least any key that is present on a standard keyboard. E.g., Finder also has examples for numbers and /:

screen shot 2017-01-27 at 17 49 11
tjanson commented 7 years ago

Here’s a list of keys we might consider for modification:

This is just meant as a starting point. Not all modifier–key combinations are reasonable or feasible (e.g., Layer 3 cannot be combined with Shift, since that’s Layer 5).

jgosmann commented 7 years ago

I made a commit that should mostly fix this. Can you test whether it works for you? I did not test all potential key combinations, but if it seems to work for common ones, I can fix others on a case by case basis when noticed.

I did not address key combinations involving layer 3. This would need to be addressed via the keyboard layout file. But apart from that I don't think it is possible in a reasonable way because the layer 3 modifier key is option/alt. As such in combination with other modifier keys (cmd, shift) it should act as option/alt and map to layer 1.

tjanson commented 7 years ago

But apart from that I don't think it is possible in a reasonable way because the layer 3 modifier key is option/alt. As such in combination with other modifier keys (cmd, shift) it should act as option/alt and map to layer 1.

That’s a good point. I tried to test both Layer 4 and Layer 3 keys with modifiers, but I’m not sure what a reference to test again would be. Different applications interpret things differently (presumably based on which API they access).

For example, I tried setting up a binding for Mod4+N = ¿ (for the sake of argument), which was interpreted as:

App Interpretation
system shortcuts* ⌥⇧Ü
Keyboard Maestro ⇧S
IntelliJ IDEA ⌥D

* Preferences → Keyboard → Shortcuts (this is presumably as “definitive” as it gets)

For other keys / combinations, results varied just as much. Given this variety, I suggest taking a pragmatic approach and seeing what problems — if any — come up in practice. As it happens, all the Finder bindings in the screenshot above now work perfectly.

jgosmann commented 7 years ago

For example, I tried setting up a binding for Mod4+N = ¿

Shortcuts with such keys will be problematic in general because that key combination remaps to two key combinations with different modifiers “pressed” in succession (the first one presses a dead key and the second one determines the character to be printed given the dead key state). So depending on the application it might register either the first or the second key combination. The first will be the same for all keys of this sort, the second one corresponds to a key combination involving a different layer (e.g., ⇧S). So either one is not the desired shortcut.

jgosmann commented 7 years ago

I'm closing this as this should be fixed for the key combinations where it is possible to add additional modifiers and I believe it won't be (easily) fixable for other key combinations.