1

Using Karabiner I'm trying to fix the annoying scrollwheel-zoom inconsistencies between Photoshop and Illustrator, i.e. the Alt + Scrollwheel Up/Down behavior.

I favor Photoshop's way of zooming: Alt + ScrollWheel UP zooms in and vice versa.

Therefore I've edited my private.xml in Karabiner and managed to get the reverse scrolling working and restricting it to Illustrator only. BUT I can't find a way to get it working conditionally, meaning, now it has reversed scrolling in each and every situation, whereas I only want it to come in effect when zooming (i.e. when I hold down Alt and scroll).

Here's the exact logic I'm trying to achieve:


Only reverse scrollwheel when holding down Alt in Illustrator.


My current private.xml looks like this; how can I amend this correctly?

<?xml version="1.0"?>
<root>
  <item>
    <name>My Custom Remaps</name>

    <item>
      <name>Reverse Vertical ScrollWheel in Illustrator (holding down Alt)</name>
      <identifier>private.remap.reverse_vertical_scrolling</identifier>
      <only>ILLUSTRATOR</only>
      <autogen>
        __FlipScrollWheel__
        Option::FLIPSCROLLWHEEL_VERTICAL,
      </autogen>
    </item>

  </item>
</root>
2

Use Option::KEYTOKEY_BEFORE_KEYDOWN together with KeyCode::VK_CONFIG_:

<?xml version="1.0"?>
<root>
  <item>
    <name>invertscrolling</name>
    <identifier vk_config="true">invertscrolling</identifier>
    <autogen>__FlipScrollWheel__ Option::FLIPSCROLLWHEEL_VERTICAL</autogen>
  </item>
  <item>
    <name>test</name>
    <identifier>test</identifier>
    <only>ILLUSTRATOR</only>
    <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::OPTION_L,
    Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_TOGGLE_invertscrolling,
    Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_TOGGLE_invertscrolling</autogen>
    <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::OPTION_L,
    Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_TOGGLE_invertscrolling,
    Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_TOGGLE_invertscrolling</autogen>
  </item>
</root>

More information about KeyRemap4MacBook:

http://pqrs.org/macosx/keyremap4macbook/xml.html.en
https://raw.github.com/tekezo/KeyRemap4MacBook/master/Tests/lib/string/data/checkbox.xml
http://osxnotes.net/keyremap4macbook.html

1

Got a reply back from the author. He informed me that the key technique is to use <modifier_only> for this particular use case. Working solution:

<item>
  <name>My Custom Remaps</name>
  <item>
    <name>Reverse Vertical ScrollWheel in Illustrator (holding down Alt)</name>
    <identifier>private.remap.reverse_vertical_scrolling</identifier>
    <only>ILLUSTRATOR</only>
    <modifier_only>ModifierFlag::OPTION_L</modifier_only>
    <autogen>
      __FlipScrollWheel__
      Option::FLIPSCROLLWHEEL_VERTICAL,
      Option::FLIPSCROLLWHEEL_HORIZONTAL,
    </autogen>
  </item>
</item>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .