Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for using numpad arrows to navigate the menu #12302

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Pjsrcool
Copy link
Contributor

Currently, the real arrow keys work when navigating the Cinnamon Menu, but the numpad arrows do not.

This PR adds the ability to navigate the Cinnamon menu with the numpad arrows.

This is a quality of life change for those who

  • use keyboards with a numpad but no arrows, or tiny laptop arrows
  • use southpaw (left handed) keyboards
  • use 60% keyboards and have external numpads

Question: For the section where it flips the direction for RTL layouts, does this also apply for numpad arrows too? I am unfamiliar with RTL layouts so I am not confident in making this decision myself.

@Pjsrcool Pjsrcool changed the title added support for using numpad arrows to navigate the menu [WIP] added support for using numpad arrows to navigate the menu Jul 22, 2024
@Pjsrcool Pjsrcool marked this pull request as ready for review July 22, 2024 00:48
@fredcw
Copy link
Contributor

fredcw commented Jul 22, 2024

Looks OK and seems to work fine except yes, you do need to flip the direction for RTL layouts so that the keypad does the same as the arrow keys.

line 1759:

        if (St.Widget.get_default_direction() === St.TextDirection.RTL) {
            if (symbol === Clutter.KEY_Right || symbol === Clutter.KEY_KP_Right) {
                symbol = Clutter.KEY_Left;
            } else if (symbol === Clutter.KEY_Left || symbol === Clutter.KEY_KP_Left) {
                symbol = Clutter.KEY_Right;
            }
        }

@Pjsrcool
Copy link
Contributor Author

I've added the logic to account for RTL layout as recommended above. I'm happy with this unless there are more necessary changes.

@Pjsrcool Pjsrcool changed the title [WIP] added support for using numpad arrows to navigate the menu added support for using numpad arrows to navigate the menu Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants