homebrew-emacsmacport icon indicating copy to clipboard operation
homebrew-emacsmacport copied to clipboard

Meta/option/alt not working "correctly"?

Open alienbogart opened this issue 4 years ago • 8 comments

Any meta keybinding combination results in the characters the Macbook Air producing on other programs, completely ignoring defaults and my personal keybindings. For example, M-b generates a .

How can I make this work as intended, so M-b generates backward-word and so on?

My init: https://gist.github.com/mrbig033/95521a76dec65a4bfa462d58c7094cb7

alienbogart avatar Apr 16 '20 10:04 alienbogart

But if you want to remap keys you can use something like https://karabiner-elements.pqrs.org/

Along with the variables as shown here: https://www.wisdomandwonder.com/article/10269/screencast-the-best-emacs-modifier-key-setup-for-os-x

dotemacs avatar Apr 16 '20 12:04 dotemacs

@dotemacs I don't see how that could word since this is clearly an issue with this Emacs package. Regular homebrew Emacs works fine. Besides, I don't wish to change Meta behavior outside Emacs.

iTerm2 also managed to work perfectly.

alienbogart avatar Apr 17 '20 11:04 alienbogart

I have the same problem. It's not only the option key is wrong, the command key doesn't work as usual macOS shortcuts as well. E.g., command + v is not pasting but " √ "

wpix avatar Apr 21 '20 04:04 wpix

I can assure you that in over twenty odd years in using Emacs that I’ve yet to encounter an OS where keyboard settings work out of the box for Emacs. Maybe with NetBSD and in console only.

You always have to do some sort of keyboard adjustment/tweaking.

The tips I shared above is how you’d do it on macOS.

On 21 Apr 2020, at 5:15 am, wpix [email protected] wrote:  I have the same problem. It's not only the option key is wrong, the command key doesn't work as usual macOS shortcuts as well. E.g., command + v is not pasting but " √ "

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dotemacs avatar Apr 21 '20 07:04 dotemacs

I can assure you that in over twenty odd years in using Emacs that I’ve yet to encounter an OS where keyboard settings work out of the box for Emacs. Maybe with NetBSD and in console only. You always have to do some sort of keyboard adjustment/tweaking. The tips I shared above is how you’d do it on macOS.

On 21 Apr 2020, at 5:15 am, wpix @.***> wrote:  I have the same problem. It's not only the option key is wrong, the command key doesn't work as usual macOS shortcuts as well. E.g., command + v is not pasting but " √ " — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Well, I never had any issues on Linux.

alienbogart avatar Apr 23 '20 01:04 alienbogart

This spin of emacs sets Cmd to meta and seems to leave option alone to retain the various keybindings that Apple puts on option. (this also causes the issue that @wpix sees)

You can make option be meta with

(setq mac-option-modifier 'meta)

Setting mac-command-modifier to super doesn't fix the issue of not having standard macOS copy/paste/etc but there should also be a way to solve that.

cnasc avatar Jun 11 '20 19:06 cnasc

(setq mac-option-modifier 'meta)

Thanks @cnasc . This works for me. the official build or emacs-plus default option as meta. Not sure why this is different.

duhd1993 avatar Dec 16 '20 14:12 duhd1993

Thanks for a wonderful package folks. The meta behaviour is a bit jarring.

the official build or emacs-plus default option as meta. Not sure why this is different.

I thought I was seeing things. The official package uses meta by default. Building with custom options disables meta somehow 🤷

dmitrym0 avatar Mar 12 '22 00:03 dmitrym0