intellij-ideaintellij-13intellij-14

Intellij IDEA, control page up, page down scroll size


I am not satisfied with the scrolling behaviour in intellij for page up, page down. It doesn't feel right. It always feels as if I get out of the scope.

Is it possible to adjust the scroll size of page up, page down? Perhaps to half a page or similar.


Solution

  • Since many are inquiring about this, for mac users this can be controlled globally instead by instead scrolling on page up/down using karabiner application and adding the following complex rule:

    {
        "description": "mmm.karabiner.page.up.down.to.scroll",
        "manipulators": [
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "from": {
                    "key_code": "page_up"
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": -51
                        }
                    }
                ],
                "to_delayed_action": {
                    "to_if_invoked": [
                        {
                            "pointing_button": "button1"
                        }
                    ]
                },
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_unless"
                    }
                ],
                "from": {
                    "key_code": "page_up"
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": -51
                        }
                    }
                ],
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "from": {
                    "key_code": "up_arrow",
                    "modifiers": {
                        "mandatory": [
                            "fn"
                        ]
                    }
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": -51
                        }
                    }
                ],
                "to_delayed_action": {
                    "to_if_invoked": [
                        {
                            "pointing_button": "button1"
                        }
                    ]
                },
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_unless"
                    }
                ],
                "from": {
                    "key_code": "up_arrow",
                    "modifiers": {
                        "mandatory": [
                            "fn"
                        ]
                    }
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": -51
                        }
                    }
                ],
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "from": {
                    "key_code": "page_down"
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": 51
                        }
                    }
                ],
                "to_delayed_action": {
                    "to_if_invoked": [
                        {
                            "pointing_button": "button1"
                        }
                    ]
                },
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_unless"
                    }
                ],
                "from": {
                    "key_code": "page_down"
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": 51
                        }
                    }
                ],
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "from": {
                    "key_code": "down_arrow",
                    "modifiers": {
                        "mandatory": [
                            "fn"
                        ]
                    }
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": 51
                        }
                    }
                ],
                "to_delayed_action": {
                    "to_if_invoked": [
                        {
                            "pointing_button": "button1"
                        }
                    ]
                },
                "type": "basic"
            },
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "^net.java.openjdk.cmd",
                            "^com.jetbrains.intellij"
                        ],
                        "type": "frontmost_application_unless"
                    }
                ],
                "from": {
                    "key_code": "down_arrow",
                    "modifiers": {
                        "mandatory": [
                            "fn"
                        ]
                    }
                },
                "to": [
                    {
                        "mouse_key": {
                            "vertical_wheel": 51
                        }
                    }
                ],
                "type": "basic"
            }
        ]
    },
    

    Also do note, to get smooth scrolling, consider down loading Mos application and adjust the preferences if desired.

    https://mos.caldis.me/

    This might have other consequences on your Mac so you might need to have to adjust other things since your page_up/down is no longer a page_up/down but mouse scrolls instead.