Karabiner-elements: Keep caps_lock and return_or_enter work if only one key pressed

Created on 24 Oct 2016  路  5Comments  路  Source: pqrs-org/Karabiner-Elements

I use emacs and enjoyed remapping caps_lock and return_or_enter to ctrl when on EI Capitan and have Karabiner there, where I can keep [return] functional still as return (after remapping to ctrl) if only one key pressed, here's the function I want:

  1. Use the UI configuration remap both [caps lock] and [return] to [ctrl]
  2. After remapping:

    • if only [caps lock] or [return] pressed, function as original key.

    • if [caps lock] or [return] used as modifier and pressed with other keys, function as [ctrl]

I have a workaround patch to make it work with current _Simple Modifications_:

  1. cherry-pick this patch, compile and install https://gist.github.com/chophi/74fe0fbb32b829c618040ee00ae0a45f
  2. remap both [caps lock] and [return] to [ctrl] in _Simple Modifications_

I hope this can help someone who has the same need.
If there will be a configure I can choose like we have in Karabiner, it would be wonderful.

Most helpful comment

Also heavily interested in having a Modifier/Single alternatives for the same key.

My particular use case:

  • When used as a meta modifier (in combination with another key), act as ctrl.
  • When used as a single keypress (no additional keypresses), act as escape.

All 5 comments

Also heavily interested in having a Modifier/Single alternatives for the same key.

My particular use case:

  • When used as a meta modifier (in combination with another key), act as ctrl.
  • When used as a single keypress (no additional keypresses), act as escape.

I suppose https://github.com/tekezo/Karabiner-Elements/issues/228 is another use case of this. That is:

  • When Space is used in combination with another key, act as Shift_L.
  • When Space is used alone, act as Space.

Seems #247 is the fix we need.

Very nice, thank you.

Well, I just tested @wwwjfy 's release and it seems to work with newly introduced standalone_modifiers. So I moved the Ctrl modifiers to the home row on default keyboard. See pull #247 for the config.

Was this page helpful?
0 / 5 - 0 ratings