Skip to content

When setting keyboard shortcuts, existing Rectangle shortcuts continue to have effect #195

Closed

Description

@finite-state-machine

macOS version: 10.14.6 (18G103)
Rectangle version: v0.31 (36)

When setting keyboard shortcuts, shortcuts which are already assigned continue to have effect, interfering with the shortcut selection process.

A user new to Rectangle attempts to assign a keyboard shortcut which happens to conflict with one of Rectangle's default shortcuts:

  1. The user opens the Rectangle preferences pane and selects the shortcuts tab.
  2. S/he clicks the shortcut box next to one of Rectangle's actions.
  3. S/he then presses a key combination which happens to already be assigned (by default) to some other action.

Expected behaviour: show a message about a conflicting choice of shortcuts (and perhaps ask the user if they want to override the existing shortcut.)

Actual behaviour: the Rectangle preferences window jumps around in unexpected ways. Rectangle continues to prompt the user to select a shortcut.

On a personal note, thanks for a brilliant piece of software! I hope this bug report will prove useful.

logs (showing that the preferences window was moved, rather than assigning the shortcut as expected):
2020-07-19T10:57:23-04:00: AX sizing proposed: (697.0, 433.0), result: (697.0, 433.0) 2020-07-19T10:57:23-04:00: AX position proposed: (1572.0, 835.0), result: (1572.0, 835.0) 2020-07-19T10:57:23-04:00: AX sizing proposed: (697.0, 433.0), result: (697.0, 433.0) 2020-07-19T10:57:23-04:00: center | display: (0.0, 80.0, 3840.0, 2057.0), calculatedRect: (1572.0, 835.0, 697.0, 433.0), resultRect: (1572.0, 835.0, 697.0, 433.0)

Activity

  1. added
    bug
    on Jul 19, 2020
  2. erikhuizinga commented on Aug 1, 2020

    @erikhuizinga

    Any existing keyboard shortcut being pressed should indeed be ignored:

    1. Ignore the window change behaviour (if any, not all always have a visible effect).
    2. Notify the user that the shortcut is already assigned to another action.

    Optionally, the user might want to unset the existing binding in the process.

  3. AkiyamaKunka commented on Nov 18, 2026

    @AkiyamaKunka
    Contributor

    This was fixed in v0.96 by #1759 (be01013). While a shortcut is being recorded in Settings, Rectangle now suspends all of its own shortcuts, so pressing one that's already assigned gets recorded instead of acting on the Settings window. Current main still does this (ShortcutManager.shortcutRecordingChanged).

    One thing differs from what was asked: there's no "already assigned" warning. Since the same change, one shortcut can be given to several actions, and pressing it cycles through them. So I think this can be closed, and a conflict notice could be its own feature request if someone still wants it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions