I use a keyboard layout called 3l (three layout) which is a layered keyboard layout. Here is the main layer (the behaviour when no modifier keys are pressed):
Now, when I am holding down the ' on a normal keyboard (sym in 3l), I am in "symbols" mode and the rest of the keyboard behaves differently. Here's a picture of this mode:
Effectively, this symbols key is like a special Shift which allows me to access special characters.
Additionally, I have a numbers layer which has the same effect as the symbols layer and is activated by the / key, but has cursor and number-pad controls instead:
The person I forked my layout from already got the layout working in Linux and Windows (using AutoHotKey). I am trying to port it to macOS as well. So far I have created a
3l.keylayout file (see it here) and have very basic functionality working.
- The keys in normal mode work fine.
- If I press the symbol modifier key, the first character I press is outputted as the correct symbol. For example, if I press the symbol key and then O,
- The same goes for the cur/num key for the numberpad output.
What's not Working
- If I press and hold the symbol modifier key, and type multiple characters, only the first one actually outputs the symbol. (Same goes for the cur/num key as well.)
- If I press and release one of the modifier keys and then press another key, the symbol/number is outputted. This should not be the case. When I release the modifier key, I want it to go back to normal mode (just like the Shift key).
- The cursor manipulation keys do not work reliably in all applications and they also have the issue of not allowing repeated keys when they do work.
Is there any way for me to get the functionality I described above in macOS (Sierra and later)?
Note: I have also tried to remap ' and / to Right Option and Right Control using Karabiner Elements and then attempted to create a new
3l.keylayout that is activated by those keys. This did not work, however. It screwed everything up and I got into a perpetual control/option key situation.