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

Add numeric keypad symbols in keyToCharacterMapping #128

Merged
merged 2 commits into from May 4, 2023

Conversation

soundflix
Copy link
Contributor

numeric keypad keys are distinct triggers to their counterparts from main keyboard. They should be represented by different symbols to the user.
My solution uses Unicode COMBINING ENCLOSING KEYCAP.

using Unicode COMBINING ENCLOSING KEYCAP

(cherry picked from commit 4cdf170)
.keypad0: "0\u{20e3}",
.keypad1: "1\u{20e3}",
.keypad2: "2\u{20e3}",
.keypad3: "3\u{20e3}",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tiny problem with this is that the keycap style will not be shown in some places, like in a menu.

Screenshot 2023-04-27 at 02 18 44

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be to use circled numbers: "\u{2462}", but they are quite small...

Screenshot 2023-04-27 at 02 19 56

Screenshot 2023-04-27 at 02 20 06

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the circled numbers, found them to be too small.
The other alternative I see is plain strings like "keypad 3".

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have a keypad, try going to System Settings => Keyboard => Keyboard Shortcuts and see what Apple uses for these.

@soundflix
Copy link
Contributor Author

Bildschirmfoto 2023-04-26 um 22 05 58

These are my findings in ...

System Settings > Keyboard > Keyboard Shortcuts

0 1 2 3 4 5 6 7 8 9 + -

no visible distinction to main keyboard

= / *

no visible distinction, but you wouldn't have them on main keyboard, as they are shifted.

keypad Clear

x in a box (but looks different than the ones I saw in unicode table)

keypad Enter

edgy arrow, different than Return

keypad decimal separator

, or . depeding on locale

All keypad keys work as distinct trigger, i.e. you will have independent shortcuts with main versus keypad keys, even if the look the same in display.
In addition, you can use all keypad keys as trigger without any modifier!

@sindresorhus sindresorhus merged commit 746f74e into sindresorhus:main May 4, 2023
1 check passed
@sindresorhus
Copy link
Owner

Thanks for investigating. We can go for this for now. 👍

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.

None yet

2 participants