[wish] Additional remappings for Microsoft Natural Ergonomic 4000 Keyboard #516

Open
twardoch opened this Issue Nov 17, 2015 · 9 comments

Projects

None yet

4 participants

@twardoch

I have a Microsoft Natural Ergonomic 4000 Keyboard, and Karabiner neatly allows me to swap the left-side modifier keys to the Mac-native order in Device Specific Mixed Settings / For Microsoft Natural Ergonomic 4000 Keyboard (UK). The option Use Windows Key as Option remaps COMMAND_L to OPTION_L, and the option Use Alt Key as Command remaps OPTION_L to COMMAND_L. That's great.

However, the old Microsoft keyboard driver (which no longer works on El Capitan) also had an additional option to swap the right-side modifier keys. So I'd like to suggest the following changes:

  1. Keep the checkbox Use Windows Key as Option that remaps COMMAND_L to OPTION_L,
  2. Rename the checkbox Use Alt Key as Command to Use Left Alt Key as Command and keep it to remap OPTION_L to COMMAND_L (which it currently does).
  3. Add a checkbox Use Right Alt Key as Command and make it remap OPTION_R to COMMAND_R.
  4. Add a checkbox Use Application Key as Option and make it remap PC_APPLICATION to OPTION_R.

These four settings together would give back the options available in the Microsoft driver.

Below is the updated contents of include/checkbox/devices/microsoft_natural_ergonomic_keyboard.xml that reflects those changes. For now, I have placed this into the private.xml file and disabled Misc & Uninstall / Use prepared settings. It works great! Thank you for making Karabiner, it’s fantastic! :)

<?xml version="1.0"?>
<root>

  <!-- Dave Griffin customisation for the Microsoft Natural Ergonomic Keyboard 4000 (UK) -->

  <item>
    <name>For Microsoft Natural Ergonomic 4000 Keyboard (UK)</name>

    <item>
      <name>fix Backquote(`) key</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.fix_backquote</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <!-- note that BACKQUOTE is actually BACKSLASH, and UK_SECTION is the real BACKTICK -->
      <autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::UK_SECTION</autogen>
    </item>

    <item>
      <name>fix backslash(\) key</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.fix_backslash</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <!-- UK_SECTION to BACKQUOTE - makes the actual backslash key sends backslash ! -->
      <autogen>__KeyToKey__ KeyCode::UK_SECTION, KeyCode::BACKQUOTE</autogen>
    </item>

    <item>
      <name>Use Windows Key as Option</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.Windows_key_as_Option</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
    </item>

    <item>
      <name>Use Left Alt Key as Command</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.Alt_key_as_Command</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
    </item>

    <item>
      <name>Use Right Alt Key as Command</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.Right_Alt_key_as_Command</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>
    </item>

    <item>
      <name>Use Application Key as Option</name>
      <identifier>remap.microsoft_natural_ergonomic_keyboard.Application_key_as_Option</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <autogen>__KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::OPTION_R</autogen>
    </item>

    <item>
      <name>Swap @ and double-quote(") Done by default if 'British PC'keyboard already specified?</name>
      <!-- this is done by default it seems -->
      <identifier>remap.microsoft_natural_ergonomic_keyboard.switch_doublequote</identifier>
      <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_NATURAL_ERGONOMIC_4000</device_only>
      <autogen>__KeyToKey__ KeyCode::KEY_2, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::QUOTE, ModifierFlag::SHIFT_L</autogen>
      <autogen>__KeyToKey__ KeyCode::QUOTE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::KEY_2, ModifierFlag::SHIFT_L</autogen>
    </item>

  </item>

</root>
@tekezo tekezo added a commit that referenced this issue Nov 17, 2015
@tekezo apply #516 40c48ec
@tekezo
Owner

Thank you!
I've updated prepared settings at Karabiner 10.14.10.
Please confirm the latest beta version.

How to upgrade to the latest beta version:
https://pqrs.org/osx/karabiner/document.html#check-for-updates

@binarykitchen

The above changes do not work with the latest version. Have all of them ticket, yet, the ALT key is not linked to the command key.

@tekezo
Owner

@binarykitchen Karabiner does not work if you installed IntelliType. Please confirm that IntelliType is not installed in your system.

@binarykitchen

@tekezo confirming here, it is intellitype is not installed. still does not work ...

@tekezo
Owner

@binarykitchen Could you show me the EventViewer result in the following cases?
https://pqrs.org/osx/karabiner/document.html.en#eventviewer

  • Press the ALT key with Karabiner settings are enabled.
  • Press the ALT key with Karabiner settings are disabled.

If both results are same, I guess you've installed another keyboard driver that is conflicting with Karabiner.
Please show me your loaded kexts by this command in Terminal.

  1. Open Terminal app from Launchpad.
  2. Execute this command in Terminal.
kextstat | grep -v com.apple
@binarykitchen

before i do that, i let you know that i am using another trick to make it work. in mac os, under settings > keyboard > modifier keys i remapped the keys to their commands there. without karabiner and seems to work fine so far.

@tekezo
Owner

@binarykitchen OK, you can do that way. Please consider using Karabiner if you want to change the left and right modifiers separately.

@binarykitchen

sweet, all good then

@jkatzer

check out #703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment