Skip to content

Instantly share code, notes, and snippets.

@george124816
Created October 24, 2025 00:36
Show Gist options
  • Select an option

  • Save george124816/3504e4903d2ec887836303f195b48dfd to your computer and use it in GitHub Desktop.

Select an option

Save george124816/3504e4903d2ec887836303f195b48dfd to your computer and use it in GitHub Desktop.
Elecom Deft Pro
# /etc/X11/xorg.conf.d/30-trackball.conf
Section "InputClass"
Identifier "ELECOM TrackBall Mouse DEFT Pro TrackBall"
MatchProduct "ELECOM TrackBall Mouse DEFT Pro TrackBall"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "11"
Option "NaturalScrolling" "false"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 1 3 2"
EndSection
@george124816

Copy link
Copy Markdown
Author

recently I move to hyprland and this uses wayland instead xorg, I had to move to another tool called input-remapper with this config

/home/$USER/.config/input-remapper-2/presets/ELECOM TrackBall Mouse DEFT Pro TrackBall/remap-trackball.json

[
    {
        "input_combination": [
            {
                "type": 1,
                "code": 278
            },
            {
                "type": 2,
                "code": 0,
                "analog_threshold": -1
            }
        ],
        "target_uinput": "mouse",
        "output_symbol": "disable",
        "mapping_type": "key_macro"
    },
    {
        "input_combination": [
            {
                "type": 1,
                "code": 278
            },
            {
                "type": 2,
                "code": 0,
                "analog_threshold": 1
            }
        ],
        "target_uinput": "mouse",
        "output_symbol": "disable",
        "mapping_type": "key_macro"
    },
    {
        "input_combination": [
            {
                "type": 1,
                "code": 278,
                "origin_hash": "b58c0c31482e39ec1265eac9cf0db625"
            },
            {
                "type": 2,
                "code": 1,
                "origin_hash": "b58c0c31482e39ec1265eac9cf0db625",
                "analog_threshold": 1
            }
        ],
        "target_uinput": "mouse",
        "output_type": 2,
        "output_code": 8,
        "mapping_type": "analog",
        "deadzone": 0.0,
        "gain": 2.0
    },
    {
        "input_combination": [
            {
                "type": 1,
                "code": 278,
                "origin_hash": "b58c0c31482e39ec1265eac9cf0db625"
            },
            {
                "type": 2,
                "code": 1,
                "origin_hash": "b58c0c31482e39ec1265eac9cf0db625"
            }
        ],
        "target_uinput": "mouse",
        "output_type": 2,
        "output_code": 8,
        "mapping_type": "analog",
        "deadzone": 0.0,
        "gain": -2.0
    }
]

/home/$USER/.config/input-remapper-2/config.json

{
    "version": "2.2.1",
    "autoload": {
        "ELECOM TrackBall Mouse DEFT Pro TrackBall": "remap-trackball"
    }
}

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