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 use edit-server when using command+tab #168

Open
parhamdoustdar opened this issue Jun 5, 2020 · 5 comments
Open

Can't use edit-server when using command+tab #168

parhamdoustdar opened this issue Jun 5, 2020 · 5 comments
Labels
question this is a question, not a bug user interface

Comments

@parhamdoustdar
Copy link

Hi,

I'm using the latest MacOS and Emacs 29.0.50. Here is how I try to use edit-server:

  1. I have edit-server-new-frame set to nil. I use Emacspeak, so a buffer would be a lot easier for me to use than a new frame.
  2. I do C-u -x edit-server-start.
  3. Then, I go to a text box, and I press Command+e. I'm blind, so I don't see what happens on the screen, but when I use COmmand+tab to go to the Emacs window and edit the buffer, this is what the *Messages* buffer says:
accept from 127.0.0.1

Got HTTP ‘POST’ request of url ‘/foreground’, processing in buffer ‘ *edit-server*-948322’...
Processed headers, length: 11, url: nil, file: nil
sending edit-server response
Editing done, sent HTTP OK response.

It seems like when I press Command+tab, since I leave the text box, edit-server sends the response. So, I feel like I'm supposed to use this package in a form I don't quite understand.

Could you give me any pointers?

Thanks!

@stsquad stsquad added the question this is a question, not a bug label Jun 10, 2020
@stsquad
Copy link
Owner

stsquad commented Jun 10, 2020

Ahh I think we have a documentation or UI errror. That is because Command+e issues a foreground command which was added to bring Emacs to the foreground with the contents of the clipboard. The command that activates the editing is Alt+e by default.

@stsquad
Copy link
Owner

stsquad commented Jun 10, 2020

I've just realised the keyboard shortcut isn't enabled by default - it in the extension configuration tab under settings/configuration/interface and the check boxes for the enabling the various methods to invoke the editor. The default method is to click the edit button that floats near each text box which I'm guessing isn't super accessible for visually impaired users.

If you have any suggestions for how to improve accessibility please let me know and I'll do my best to improve it.

@parhamdoustdar
Copy link
Author

Ah, I think I was not using Chrome's interface for setting the keystroke to activate the extension correctly. Now that I tried again, pressing the key that I assigned to "Activate extension" makes it all work.

Awesome! This extension is going to help me a lot with VoiceOver's shortcomings in Chrome! You made me life so much easier 😍

stsquad added a commit that referenced this issue Jun 10, 2020
Instead of catching the key press in a non-configurable way in the
textarea code lets use chromes UI directly. We already used to for the
"activate" foreground command so lets use it for the edit request as
well.

Remove the old enable_keys options and feed everything through
xmlcomms.
@stsquad
Copy link
Owner

stsquad commented Jun 10, 2020

Hmm interesting. I've just posted a test branch which cleaned this up a bit but as you point out the default active-extension seems to DTRT which is slightly confusing to me as I'm not sure the path it takes. I'm going to keep this open until it's all cleared up. Do keyboard shortcuts get surfaced to you by chrome itself or could we improve the documentation somewhere?

@parhamdoustdar
Copy link
Author

I think the least confusing way is ticking the box that says to open Emacs after pressing Alt+enter (I think making it say Option+enter when the platform is MacOS might be useful BTW).

The only reason I added a keystroke to activate the extension is that some text boxes use Option+enter for a functionality of their own, like creating a newline or newline with indent, or something like that. However, I'm just using Option+enter everywhere now and it hasn't caused an issue yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question this is a question, not a bug user interface
Projects
None yet
Development

No branches or pull requests

2 participants