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

Can't send meta to emacs in the browser #44

Open
LucaMarconato opened this issue Aug 7, 2022 · 3 comments
Open

Can't send meta to emacs in the browser #44

LucaMarconato opened this issue Aug 7, 2022 · 3 comments
Labels
bug Something isn't working hterm-fallout Problems caused by removing hterm

Comments

@LucaMarconato
Copy link

LucaMarconato commented Aug 7, 2022

When file a bug report (see below for feature requests)

What version of GoTTY are you using (gotty --version)?

gotty version v1.4.0

What operating system and browser are you using?

macOS Monterey 12.5
Google Chrome (Desktop) Version 103.0.5060.134 (Official Build) (x86_64)
Safari (Desktop) Version 15.6 (17613.3.9.1.5)
Safari (iPadOS 15.5)

What did you do?

I run spacemacs via gotty with
gotty --port 11111 --permit-write --reconnect emacsclient --tty -a ""
when I go to localhost:11111 I can successfully use emacs.
Since when I press the "option" key I want instead to send a "meta" key, I have tried using this config (and restarting gotty)

preferences {                                                                   
    alt_is_meta = true
}

or this config

preferences {                                                                   
    alt_is_meta = true
    alt_is_what = "browser-key"
}

but nothing changes.

What did you expect to see?

I would expect the meta key to be sent. For example, if I press for instance Option-x, I expect emacs in the browser to recognize M-x.

What did you see instead?

I get the option key instead. In the example above, if I press Option-x I get the character . So I can't use most of the emacs keybinding. As a workaround I can use spacemacs and switch to evil-mode, but I would like to use the default emacs keybindings.

@kaventec
Copy link

kaventec commented Aug 23, 2022

If it has been working for you before and now it doesn't - most likely it is linked to removal of hterm that primarily supported all the options in preferences {}. Have a look at #37 and #41 for more info. Author is contemplating re how to add customization options to xterm.js that is now being used. Until then I see a few ppl making customizations in source and re-building or going back to v1.3.0 release that still has hterm.js support.

@sorenisanerd
Copy link
Owner

I'm not an emacs user myself. Can you help me understand how I can reproduce it? Thanks!

@sorenisanerd sorenisanerd added bug Something isn't working hterm-fallout Problems caused by removing hterm labels Aug 28, 2022
@LucaMarconato
Copy link
Author

Thank you both for your answers.

@kaventec I don't know if it worked in the past as I am new to gotty.
@sorenisanerd right after opening emacs if you press M-x (which is Option+x in macOS and Alt+x in Linux) you should see a menu appearing from the bottom, this for instance correctly happens in the terminal. In the browser instead I get an error message (in the bottom status bar) mentioning the character . This because the browser didn't get that M-x was pressed, instead the OS (in my case macOS) interprets M-x as and sends this character to emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hterm-fallout Problems caused by removing hterm
Projects
None yet
Development

No branches or pull requests

3 participants