I am trying to define a keyboard layout for OS X (Mavericks). My goal is to distinguish left/right shifts. I have created this test layout but without luck. Both combinations left/right shift + q produces the same.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<keyboard group="0" id="5000" name="U.S." maxout="2">
<layouts>
<layout first="0" last="0" modifiers="48" mapSet="312" />
</layouts>
<modifierMap id="48" defaultIndex="0">
<keyMapSelect mapIndex="0">
<modifier keys="" />
</keyMapSelect>
<keyMapSelect mapIndex="1">
<modifier keys="shift" />
</keyMapSelect>
<keyMapSelect mapIndex="2">
<modifier keys="rightShift" />
</keyMapSelect>
</modifierMap>
<keyMapSet id="312">
<keyMap index="0">
<key code="12" output="q" />
</keyMap>
<keyMap index="1">
<key code="12" output="1" />
</keyMap>
<keyMap index="2">
<key code="12" output="2" />
</keyMap>
</keyMapSet>
</keyboard>