⌨️
The Ultimate Guide to Keyboard Layers
  • Overview
  • Ch 1: Keyboard Layers 101
    • 1.1 Keyboard Fundamentals
    • 1.2 Why Use Layers
    • 1.3 Layer Challenges
  • Ch 2: Setup
    • 2.1 Keyboards
    • 2.2 Firmware
    • 2.3 Independent Software
  • Ch 3: Layer Activators
    • 3.1 Modifier Layers
    • 3.2 Momentary Layers
    • 3.3 Toggle Layers
    • 3.4 One Shot Layers
    • 3.5 Dual Layers
    • 3.6 Tap Dance / Superkeys
  • Ch 4: Creating Layers
    • 4.1 Planning Layers
    • 4.2 Implementing Layers
  • Ch 5: Advance Layer Patterns
    • 5.1 Key Functionality Across Layers
    • 5.2 Color Coding Keys
    • 5.3 Thumb Keys
    • 5.4 Nesting Layers
    • 5.5 Categorizing Layers
  • Ch 6: Layer Examples
    • Layers
      • Default Layer
      • Shift Layer
      • Numpad Layer
      • Symbols Layer
      • Editing & Navigating Layer
      • Media Layer
      • Mouse Layer
      • Screen Management Layer
      • Context Control / Macro Layer
      • Browser Layer
      • VS Code Layer
      • Discord Layer
      • Slack Layer
      • Gaming Layer
  • Timeline
    • Keyboard Timeline
Powered by GitBook
On this page
  1. Ch 6: Layer Examples
  2. Layers

Mouse Layer

PreviousMedia LayerNextScreen Management Layer

Last updated 2 years ago

A mouse layer is a layer that moves the mouse cursor with keyboard keys. I use karabiner-elements to control the mouse and found most other mouse controlling software are not practical because the mouse cursor is either too slow or too fast. If a speed modifier is available though, then a user can slow the mouse cursor speed when they need precision and speed it up to move quickly around. Originally, I started out with one fast and one slow speed modifier. As I became more comfortable and less impatient, I added in additional modifiers.

Additionally, a mouse layer can have ways to set save points for your mouse cursor to teleport the cursor to specific areas on the screen, such as the center. Teleporting the mouse cursor around is very convenient if you have multiple monitors like my setup below. I have one laptop, 3 ultrawide save points(left half centerish, middle, right half centerish), and one on the top monitor. With this setup, I find it faster to use my mouse keyboard layer than a normal mouse.

There are 3 types of clicks, left, right and cmd+click for opening links quickly. Click types are in blue. Scrolling is also on this layer in yellow keys and the speed modifiers can be used to quickly or slowly scroll.

Description
Hotkey

left click

f

right lick

g

left click + cmd

v

slow modifier .3

a

slow modifier .5

1

speed modifier 2.0

s

speed modifier 1.5

d

scroll up

u

scroll down

o

left cursor movement

j

right cursor movement

l

up cursor movement

i

down cursor movement

k

move cursor to left side screen(ultrawide)

m

move cursor to center(ultrawide)

2

move cursor to right side screen(ultrawide)

3

move cursor to center(laptop)(bottom)

h

move cursor to center 3rd monitor(top)

n

            "name": "Default profile",
            "parameters": {
                "delay_milliseconds_before_open_device": 1000
            },
            "selected": true,
            "simple_modifications": [
                {
                    "from": {
                        "key_code": "1",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "speed_multiplier": 0.5
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "2",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "software_function": {
                                "set_mouse_cursor_position": {
                                    "screen": 0,
                                    "x": "50%",
                                    "y": "50%"
                                }
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "3",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "software_function": {
                                "set_mouse_cursor_position": {
                                    "screen": 0,
                                    "x": "85%",
                                    "y": "50%"
                                }
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "a",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "speed_multiplier": 0.3
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "d",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "speed_multiplier": 1.5
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "pointing_button": "button1"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "g",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "modifiers": [
                                "left_command"
                            ],
                            "pointing_button": "button1"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "h",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "software_function": {
                                "set_mouse_cursor_position": {
                                    "screen": 2,
                                    "x": "50%",
                                    "y": "50%"
                                }
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "i",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "y": -1536
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "j",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "x": -1536
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "k",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "y": 1536
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "l",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "x": 1536
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "m",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "software_function": {
                                "set_mouse_cursor_position": {
                                    "screen": 0,
                                    "x": "23%",
                                    "y": "50%"
                                }
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "n",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "software_function": {
                                "set_mouse_cursor_position": {
                                    "screen": 1,
                                    "x": "50%",
                                    "y": "50%"
                                }
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "o",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "vertical_wheel": 32
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "s",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "speed_multiplier": 2.0
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "u",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "mouse_key": {
                                "vertical_wheel": -32
                            }
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "v",
                        "modifiers": {
                            "mandatory": [
                                "control",
                                "shift",
                                "right_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "pointing_button": "button2"
                        }
                    ]
                }
            ],

Getting used to a mouse layer does take some work. Doing practice drills at can help. You can select custom challenge, click on the custom button to add custom settings like .5 targets per second with 0 increase speed. As you get better you can gradual increase this amount. I can do around 1.3 targets consistently for 100 hit. Teleport keys are in orange.

aim trainer
practice drills using aim trainer
Multiple monitors that each have a cursor save point
Mouse layer