I want to use CapsLock as a modifier key to type symbols like ({\})=
using the alphabetical keys in the keyboard.
For example:
CapsLock+a is mapped to =
CapsLock+k is mapped to \
To do this, I mapped CapsLock to Option+Shift using Keyremap4Macbook following the instructions in "A Useful Capslock Key".
<item>
<name>F19 to F19</name>
<appendix>(F19 (capslock) to (shift+opt))</appendix>
<identifier>private.f192f19_escape</identifier>
<not>VIRTUALMACHINE</not>
<autogen>
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::OPTION_L,
ModifierFlag::SHIFT_L,
</autogen>
</item>
Note that, before that I mapped CapsLock to key code 80 in PcKeyboardHack which is key code of F19.
Then I mapped key combinations of CapsLock + alphabetical characters
to symbols such as =\})(
using Ukelele.
So far, everything works properly except that there is a side effect of this setup: I cannot use Alt+Shift modifier for any other key binding. This is pretty restrictive compromise.
I tried mapping CapsLock to more complex key bindings such as Ctrl+Shift+Alt or Cmd+Shift+Alt or Ctrl+Cmd+Shift+Alt. But these didn't work well because then mapping CapsLock+alphabetical keys
in Ukelele changes the alphabetical keys too. For example, assume that Ctrl+Shift+Alt+a is mapped to =
. Then a alone is mapped to =
as well.
I wonder if this problem can be solved somehow? I think there might be two alternative paths to look for solution:
- Creating a new custom modifier key for CapsLock without consuming existing modifier keys such as Alt+Shift.
- Preventing the mapping of Ctrl+Shift+Alt+a to change the a key all together.
Are these solutions possible to implement?