pqrs-org / Karabiner-archived

Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
https://pqrs.org/osx/karabiner/
The Unlicense
3.82k stars 309 forks source link

Remap Mouse Key Scrolling to S + D + F #757

Closed nikitavoloboev closed 8 years ago

nikitavoloboev commented 8 years ago

This setting :

2016-11-06 at 23 12

I wish to make assign it to S key instead and when S and D are held together I can scroll with hjkl. Holding S and D and F will scroll faster.

I also wish that I can keep my S + D and S + F mappings alone so that when I press and hold S and release on D, it will do an action like ones I do here :

<item>
    <name>sticky s for essential things not in iTerm</name>
    <identifier>private.launcher_mode_open_apps_v23</identifier>
    <not>ITERM</not>

    <!-- condition: turn on launcher mode only when the trigger key is pressed without other keys. -->
    <pressingphysicalkeys_lessthan>2</pressingphysicalkeys_lessthan>
    <modifier_not>
      ModifierFlag::COMMAND_L,
      ModifierFlag::COMMAND_R,
      ModifierFlag::CONTROL_L,
      ModifierFlag::CONTROL_R,
      ModifierFlag::FN,
      ModifierFlag::OPTION_L,
      ModifierFlag::OPTION_R,
      ModifierFlag::SHIFT_L,
      ModifierFlag::SHIFT_R,
    </modifier_not>

    <autogen>
      __KeyOverlaidModifier__
      KeyCode::S,

      <!--
          Use notsave.launcher_mode_v2 in order to be higher priority.
          Use ModifierFlag::MY_LAUNCHER_MODE for __DropAllKeys__.
      -->
      @begin
      KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_private_launcher_mode_v23, ModifierFlag::MY_LAUNCHER_MODE,
      @end

      @begin
      KeyCode::S,
      @end
    </autogen>
  </item>

  <item hidden="true">
    <identifier vk_config="true">notsave.private_launcher_mode_v23</identifier>

    <autogen>
      __BlockUntilKeyUp__ KeyCode::S,
    </autogen>

               <!-- send command-tab by m -->
               <autogen>
                 __KeyToKey__
                 KeyCode::G,
                 KeyCode::TAB, ModifierFlag::COMMAND_L,
                 <!-- release command key to commit command-tab -->
                 KeyCode::COMMAND_L,
             </autogen>

               <autogen>
               __KeyToKey__
               KeyCode::SLASH,
               KeyCode::6, ModifierFlag::COMMAND_L, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L
               </autogen>

               <autogen>
               __KeyToKey__
               KeyCode::SEMICOLON,
               KeyCode::MINUS,
               KeyCode::SPACE
               </autogen>

               <autogen>
               __KeyToKey__
               KeyCode::T,
               KeyCode::S, ModifierFlag::OPTION_L, ModifierFlag::COMMAND_L
               </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::N,
                  KeyCode::V, ModifierFlag::COMMAND_L
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::BRACKET_LEFT,
                  KeyCode::F7
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::C,
                  KeyCode::DELETE, ModifierFlag::COMMAND_L
                </autogen>

                <autogen>
                __KeyToKey__
                KeyCode::SHIFT_R,
                KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L,
                KeyCode::X, ModifierFlag::COMMAND_L,
                Option::NOREPEAT,
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::E,
                  KeyCode::TAB
                </autogen>

                <autogen>
              __KeyToKey__
              KeyCode::U,
              KeyCode::F1, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::P,
                  KeyCode::F12, ModifierFlag::COMMAND_L
                </autoger>

                <autogen>
                  __KeyToKey__
                  KeyCode::QUOTE,
                  KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L,
                  KeyCode::CURSOR_RIGHT, ModifierFlag::SHIFT_L, ModifierFlag::COMMAND_L
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::SPACE,
                  KeyCode::SPACE
                </autogen>

                <autogen>
                  __KeyToKey__
                  KeyCode::DOT,
                  KeyCode::F9
                </autogen>

               <autogen>
                   __KeyToKey__
                   KeyCode::R,
                   KeyCode::TAB, ModifierFlag::SHIFT_L
                </autogen>

               <autogen>
                   __KeyToKey__
                   KeyCode::F,
                   KeyCode::RETURN
                </autogen>

               <autogen>
                   __KeyToKey__
                   KeyCode::A,
                   KeyCode::C, ModifierFlag::COMMAND_L
                </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::V,
                 KeyCode::SHIFT_L,
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::O,
                 KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L,
                 KeyCode::RETURN,
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::D,
                 KeyCode::DELETE
               </autogen>

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

               <autogen>
               __KeyToKey__
               KeyCode::COMMA,
               KeyCode::9, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::I,
                 KeyCode::V, ModifierFlag::OPTION_L, ModifierFlag::CONTROL_L
             </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::M,
                 KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::V | ModifierFlag::SHIFT_L,
                 KeyCode::T, ModifierFlag::COMMAND_L
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::B,
                 KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::Z,
                 KeyCode::Z, ModifierFlag::COMMAND_L
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::H,
                 KeyCode::CURSOR_LEFT
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::L,
                 KeyCode::CURSOR_RIGHT
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::K,
                 KeyCode::CURSOR_UP
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::J,
                 KeyCode::CURSOR_DOWN
               </autogen>

               <autogen>
                 __KeyToKey__
                 KeyCode::BACKQUOTE,
               KeyCode::9, ModifierFlag::COMMAND_L, ModifierFlag::OPTION_L, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L
               </autogen>

  </item>
nikitavoloboev commented 8 years ago

Never mind, I see that scrolling works for areas where the mouse is currently in focus so it makes sense to have it set on D key :)