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

Enabling capitelized letters in keyboard shortcuts in markdown editor #2050

Closed
Chnapik2 opened this issue Jan 4, 2022 · 4 comments · Fixed by #2146
Closed

Enabling capitelized letters in keyboard shortcuts in markdown editor #2050

Chnapik2 opened this issue Jan 4, 2022 · 4 comments · Fixed by #2146
Labels
1. to develop bug Something isn't working good first issue Good for newcomers

Comments

@Chnapik2
Copy link

Chnapik2 commented Jan 4, 2022

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
I was working on a markdown document the other day and I was curently in caps lock mode and noticed that ctrl + B and other keyboard shortcuts do not work. When I turned caps lock off, everything was ok.

Describe the solution you'd like
Enabling keyboard shortcuts for capitalized letters, e. g. ctrl+b = ctrl+B. I am shure that it should be an easy fix and would help with being a bit more user freindly.

@szaimen szaimen transferred this issue from nextcloud/server Jan 4, 2022
@juliusknorr juliusknorr added 1. to develop bug Something isn't working good first issue Good for newcomers labels Jan 4, 2022
@mejo-
Copy link
Member

mejo- commented Jan 13, 2022

I checked other online editors (Notion and Google Docs) and there indeed shortcuts with capitalized characters work - but shortcuts with Shift don't (e.g. <Ctrl>+<Shift>+<B> doesn't toggle bold). I guess we should do the same.

@juliusknorr
Copy link
Member

It hink its not about regular shift, but having caps lock activated, there both notion and google docs seem to also toggle.

@mejo-
Copy link
Member

mejo- commented Jan 24, 2022

I reported the issue upstream: ueberdosis/tiptap#2426

Also did some local testing, and adding the uppercase key to the keymap for a mark (.e.g in Class strong in src/marks/index.js) works as expected:

	keys({ type }) {
		return {
			'Mod-b': toggleMark(type),
			'Mod-B': toggleMark(type),
		}
	}

Only downside is, that key combinations with shift (Ctrl-Shift-b in this example) will be caught as well. But as written in the upstream issue, I think that's an acceptable tradeoff.

@mejo-
Copy link
Member

mejo- commented Feb 3, 2022

Opened a PR upstream: ueberdosis/tiptap#2478

mejo- added a commit that referenced this issue Feb 3, 2022
This way, key bindings 'Mod-B', 'Mod-I' and 'Mod-U' with active caps
lock have the same effect as their lowercase siblings.

This is supposed to be fixed in Tiptap v2 upstream:
ueberdosis/tiptap#2426
ueberdosis/tiptap#2478

Fixes: #2050

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Feb 3, 2022
This way, key bindings 'Mod-B', 'Mod-I' and 'Mod-U' with active caps
lock have the same effect as their lowercase siblings.

This is supposed to be fixed in Tiptap v2 upstream:
ueberdosis/tiptap#2426
ueberdosis/tiptap#2478

Fixes: #2050

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Feb 3, 2022
This way, key bindings 'Mod-B', 'Mod-I' and 'Mod-U' with active caps
lock have the same effect as their lowercase siblings.

This is supposed to be fixed in Tiptap v2 upstream:
ueberdosis/tiptap#2426
ueberdosis/tiptap#2478

Fixes: #2050

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Feb 3, 2022
This way, key bindings 'Mod-B', 'Mod-I' and 'Mod-U' with active caps
lock have the same effect as their lowercase siblings.

This is supposed to be fixed in Tiptap v2 upstream:
ueberdosis/tiptap#2426
ueberdosis/tiptap#2478

Fixes: #2050

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Feb 3, 2022
This way, key bindings 'Mod-B', 'Mod-I' and 'Mod-U' with active caps
lock have the same effect as their lowercase siblings.

This is supposed to be fixed in Tiptap v2 upstream:
ueberdosis/tiptap#2426
ueberdosis/tiptap#2478

Fixes: #2050

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants