Skip to content

Ctrl+Alt+E Yields € symbol in addition to switching to edit mode. #355

@ccoenen

Description

@ccoenen
Contributor

If I'm in "both" mode, and press Ctrl+Alt+E to switch to "edit" mode, It will work, but it will also put an in the current cursor position.

An event.preventDefault() should probably fix this, however, this should only be done, if there's actually a switch happening (meaning: If I'm already in edit-mode, please don't preventDefault, or we won't be able to type € symbols any more).

To reproduce

  • (you may need an european keyboard layout, I'm not sure)
  • Set any pad to "both" mode where you can see the editor and rendered html at once.
  • Make sure, your focus is in the editor, so you can actually type
  • press Ctrl+Alt+E

Current Result

  • The view is being switched and you also get € at the current cursor position

Desired Result

  • when already in edit mode: just type the €
  • when not in edit mode: just switch to edit

I'm not sure if other (Ctrl+Alt+V or Ctrl+Alt+B) shortcuts interfere with anything, they do not on my layout. But this could be a general pattern, I believe.

Activity

changed the title [-]Ctrl+Alt[/-] [+]Ctrl+Alt+E Yields € symbol in addition to switching to edit mode.[/+] on Feb 12, 2017
jackycute

jackycute commented on Feb 12, 2017

@jackycute
Member

Hi @ccoenen
Thanks for reporting this.
I think it's better to change this shortcut key.
Because in the most case, user would like to change the mode while editing.
So we need to avoid browser-wide or system-wide alt keys for special symbols.

ccoenen

ccoenen commented on Feb 12, 2017

@ccoenen
ContributorAuthor

If remapping is the way forward, I'd like to propose C as letter. I have no Idea if this conflicts with anything else, but this way View, Both and Change edit would be right next to each other on many types of keyboards.

jackycute

jackycute commented on Feb 12, 2017

@jackycute
Member

Get it, I will try search any reference list all alt key symbols.
I bet you're on macOS, right?

ccoenen

ccoenen commented on Feb 12, 2017

@ccoenen
ContributorAuthor

Windows.

jackycute

jackycute commented on Feb 12, 2017

@jackycute
Member

This behavior seems related to the input method, I using Chinese input and the Ctrl+Alt+E combination won't result euro symbol.
What's your input method?

ccoenen

ccoenen commented on Feb 12, 2017

@ccoenen
ContributorAuthor

I'm on a german keyboard layout, but Ctrl+Alt+E is quite common among european keyboard layouts. There's a few examples of keyboard layouts in here: https://en.wikipedia.org/wiki/QWERTZ and a few more here https://en.wikipedia.org/wiki/QWERTY#International_variants

jackycute

jackycute commented on Feb 12, 2017

@jackycute
Member

Based on the wiki links you mentioned above.
It looks like we'll always overlap something on every key.
C key might be a good choice because it will make them all besides.
But it might be a copyright or variant of C symbol in some keyboard layout and I'm not quite sure how they input it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ccoenen@jackycute

        Issue actions

          Ctrl+Alt+E Yields € symbol in addition to switching to edit mode. · Issue #355 · hackmdio/codimd