jgosmann / Karabiner-Elements-Neo

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

Ability to disable mappings depending on keyboard layout #23

Closed hmeine closed 6 years ago

hmeine commented 7 years ago

Occasionally, I would like to switch to German / US layouts. Then, it would be convenient to have the Neo mappings disabled. (IIRC, with the original Karabiner, there were profiles that could be used for this, but maybe that was not the best interface anyhow.) What do you think? Shall we open an upstream issue? (I guess that the whole -Neo variant should eventually be upstreamed?)

jgosmann commented 7 years ago

Seems like it would be useful, but also something I won't have the time (and knowledge) to implement. So an upstream issue might be a good idea.

As for upstreaming the Neo variant: I think that would require a number of code improvements first.

ThomasR commented 7 years ago

I am currently working on streamlining and cleanup of [https://svn.neo-layout.org/mac_osx/neo.keylayout](). This led me to believe that it should be possible to use Karabiner (Elements) without the Neo branch. We just need to make sure to get the key mappings right in the .keylayout file.

Is that true? Or am I missing something?

hmeine commented 7 years ago

I just had a quick look at the upstream version, and it obviously underwent huge development since this fork happened, which has not been not merged. There are now auto-switch profiles (https://github.com/tekezo/Karabiner-Elements/issues/659), even though that's switching depending on connected keyboards, not layouts, yet, and there are now complex rules and custom complex rules (https://github.com/tekezo/Karabiner-Elements/issues/803). I don't know much about all of this yet, but to me it really sounds like one could re-evaluate whether this Neo-specific fork is still necessary.

jgosmann commented 7 years ago

@ThomasR There are certain remapping that cannot be done in a keyboard layout file as far as I know (e.g. caps lock with pressing both shift keys at the same time, layer 4 and above).

@hmeine Thanks for checking. I'm traveling the next two weeks, but I will have a look at the current upstream when I'm back.

ThomasR commented 7 years ago

Pressing caps lock with both shift keys is possible, and Karabiner Elements provides a config for that :) Look for "Shift Left + Shift Right to toggle caps lock"

Also, I managed to get Layer 4 working with Karabiner Elements (original)! It is not perfect, but most of what I need works just fine already.

In case you're interested in my current progress, you can find it here: https://gist.github.com/ThomasR/7d1dac6f2dd85b5253284468dcf3bbc3 This also includes many bugfixes for the .keylayout, which should now work with external keyboards.

jgosmann commented 6 years ago

Neo2 can now be used with the official upstream version of Karabiner-Elements. Just import and activate the required rules.

@ThomasR Feel free to make a PR with the bugfixes in the .keylayout against the jgosmann/neo2-layout-osx repository.