Hotkeys with Opt/Alt+char do not work on macos (they insert a symbol when the editor is active)

For some odd reason, when I assign Opt/Alt+n as a hotkey, I get a tilde.

You can see that this is assigned and there are no conflicts

But I get the tilde instead
SCR-20231204-mrrr

are you using a keyboard layout where alt-N is mapped to tilde? If so, there’s nothing we can do.

option + <key> on mac OS, then mac OS X, and now macOS has always given you additional symbols. This is typing option + q to option + / going left to right then down across a US Eng keyboard.

Screenshot 2023-12-05 at 4.52.15

1 Like

That’s true, but at least some apps do support it as a hotkey, when used outside of a textField.

And oddly, I can map this fine in MacOS. But I’m way back on 12.7.1 Monterey. (Obsidian 1.5.1.)

EDIT: Nevermind, I used alt-shift-N, because in the screenshot I saw a capital N. I also can’t map alt-n. But I wouldn’t recommend that anyway.

screenshot_2023-12-04_04-13-21

But since Obsidian is mostly a giant text place, ariehen is right, and it wouldn’t be a good idea to use these keys as hotkeys, and it will make typing those alternative characters impossible. (A choice you can make of course, except I guess not in Obsidian at this moment.)

1 Like

Yes, indeed. Context matters; I should have made clear in a text field.

These have been in Mac OS for a long time, maybe before multiple keyboard language input and, for sure, before emoji keyboards. On Apple’s main help page for keyboard shortcuts, you’ll notice no option/alt + something only modifiers (unless I missed one; it’s a long list).

1 Like

They’re part of the setup for a mac to allow for better input of quote characters, see keyboard viewer for details on what you can type using the Opt/Alt key.

My suggestion is therefore to not use just the Opt/Alt key, but combine it with something else. I’ve found that the combon Cmd + Ctrl is fairly safe to use as modifiers for my personal hotkeys within Obsidian.

@WhiteNoise you might want to still consider this a bug.

It’s possible to map the key combination, but then it doesn’t work. (EDIT: Actually it does work, if you have focus outside of a text field. For example, I focused on a tab, and then the alt-f hotkey works for me.)

So probably it should be blocked from being mapped, or honored for those who choose to map it.

Right now it just silently fails.

These hotkey will active the command when the editor is not active/focused. When the editor is active, they will insert the symbol instead.

For the time being, we are gonna keep it this way.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.