Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I usually need to write math with LaTeX, and after seeing this question: Entering unicode math symbols. I came here with some small questions.

I find that not perfectly comfortable, and I was wondering if there is a way in which I could tell the system to differentiate between the left and right alt ⌥. So I could have much more symbols within one letter.

And, the another question is if there is a way I could turn the caps lock ⇪ into a different key (with the same use as alt ⌥, but the system should differentiate them). In this way I could use, for instance,

  • caps lock ⇪d to get the greek letters (in this case the letter delta δ), and
  • alt ⌥d to get some math symbol of my decision (in this case the partial differential symbol ).

This is not a great example, but more or less self explaining. Of course then caps lock ⇪ shouldn't be a turn on/turn off button. It should be turned on ONLY when pressed (exactly like alt ⌥).

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In keylayout files option is left (or either) option and rightOption is right option. leftOption results in an error. Right modifier keys have been registered as left modifier keys on all keyboards I have tested with though. So for example this would also make right option + a insert α:

<modifierMap id="commonModifiers" defaultIndex="0">
    <keyMapSelect mapIndex="0">
        <modifier keys="option"/>
    </keyMapSelect>
    <keyMapSelect mapIndex="1">
        <modifier keys="rightOption"/>
    </keyMapSelect>
</modifierMap>
<keyMapSet id="ANSI">
    <keyMap index="0">
        <key code="0" output="α"/> <!-- key code 0 is QWERTY a -->
    </keyMap>
    <keyMap index="1">
        <key code="0" output="β"/>
    </keyMap>
</keyMapSet>

One workaround is to add a keymap with modifier keys like anyControl anyOption anyShift anyCommand and then remap right option with KeyRemap4MacBook:

<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::OPTION_L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::COMMAND_L</autogen>

Caps lock can also be used as a fifth modifier key in keylayout files. You can use KeyRemap4MacBook to change another key to a holdable caps lock:

<autogen>__KeyToKey__ KeyCode::OPTION_R, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::CAPSLOCK, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::CAPSLOCK</autogen>

Or use PCKeyboardHack to change caps lock to something like F19 and then remap F19 to a holdable caps lock. The "Pass-Through Caps Lock LED Status" setting disables the caps lock light on some keyboards.

See http://lri.me/osx.html for more information about custom keyboard layouts and KeyRemap4MacBook.

Other options:

share|improve this answer
    
This is great. I will look further in a few hours. By the way, my intention was not to install any extra software. So I will try with the first part and wait to some solving for the second (caps lock related). If nothing comes I will see if that works. Thank you! –  Manuel May 8 '13 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.