Support Numeric Keypad (+ / -) Zoom In / Out

Use case or problem

Currently the zooming shortcuts that utilize the standard keyboard + & - keys do not work with the same keys that are present on the numeric keypad. It’s a bit confusing. At first I thought the reason they weren’t working was related to the specifics of what I was working on. I didn’t realize until later that those keys were not functional zoom shortcuts anywhere. I originally filed this as a bug report, but was informed it was a feature request.

Hotkeys/shortcuts assigned to the standard page up, page down, home, & end keys translate across to the numeric keypad versions. It seems to only be the numeric keypad’s + & - keys that do not function for zooming.

In the settings Obsidian will properly recognize & function if you assign something else to them (e.g. numeric keypad + to toggle the pinning of a note). At this point the numeric keypad’s + key will now toggle the pinning of a note, but the standard + key will not (it will continue to function as a zoom key).

Obsidian treats the two visually (and usually functionally) identical keys as actually being different. I understand that this is likely because they really are different keys, but it’s confusing & misleading to the end user.

Proposed solution

Obsidian recognize that different keys that have the same symbols on them are the same key to the end user & match hotkey/shortcuts across them (e.g. standard + and numeric keypad +)

Current workaround (optional)

Related feature requests (optional)

2 Likes

That should not be done. They are different keys and exhibit a different behaviour — Even if the displayed outcome is the same sign. (This is only since typewriters/computers. In real typography they are different characters.)

For example pressing shift and numpad will act as if numlock was enabled whereas shift with normal numbers will produce the characters according to your locale.

Implementing this would mean that Obsidian deprived people of possible hotkeys like Ctrl + NumPad1 for Obsidian‐only hotkeys.

I do not agree with proposed solution but The request in the title “Support Numeric Keypad (+ / -) Zoom In / Out” is reasonable.
The same behavior works e.g. in Google Chrome.
I did not find zooming hotkeys to be customizable / listed in Obsidian/Settings/Hotkeys.

When user assigns Ctrl + NumPad1 to custom function then simply overwrite default behavior, i.e. stop zooming by it and start using it to triger custom function. When user restores original setting then start zooming by it again.

2 Likes

Your proposed solution sounds good, @malecjan .

I agree.

Current workaround using AutoHotkey (on Windows):

; ZOOMING BY NUMERIC KEYBOARD PLUS AND MINUS
#IfWinActive ahk_exe Obsidian.exe
^NumpadAdd::^= ; Ctrl++
^NumpadSub::^- ; Ctrl+-
#IfWinActive

Related feature request: Enable Ctrl+Scroll or gesture on touchpad to change zoom in common way