Adding a shortcut for the create action

Hello!
The topic discussed here is related to the jira ticket XWIKI-21711: Add shortcut for the create action. In order to make sure we don’t have to change the shortcut default after a first implementation (that’d be bad for user experience and go against adoption of the feature), I would like to make sure we could discuss what this default should be.

I don’t have a very strong opinion on this topic. After looking at the list of shortcuts already mapped, I came up with two ideas that would be correct.
For reference, here are the list of shortcuts I took into consideration:

Here are the two options I kept:

  1. Create a page with ` (top left key, under escape, ² on AZERTY keyboard layouts :slight_smile: )
  2. Create a page with N which would stand for “New page” <EDIT>This option is not as good as it seemed, see the explanation on post 2</EDIT>

Options I considered but ended up not being as good :

  • Ctrl + N → Already mapped at the browser level – new tab
  • C for “Create page” ->Already mapped at XWiki level – view comments
  • Shift + N → Should keep things simple and consistent. XWiki already supports a lot of ‘one key shortcuts’.

The ticket creator @slauriere liked the idea of using N for the creation shortcut, highlighting that it’s already used in Proton Mail.

Here is my +1 for option 2.

What do you think of both options? Do you know of another commonly used shortcut for creating a new object?

Lucas C.

2 Likes

I just remembered this fact:

the N shortcut is already mapped to access annotations of a page.

So if we want to use N for new page, we’d need to break the consistency of the interface on new versions (and also find a new default for the annotation shortcut).

This shortcut was not properly documented on https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/KeyboardShortcuts , I’m updating it :slight_smile: .

Hey @CharpentierLucas thank you for working on this.

I personally like the N key being used for a new page, but we call the action “Create” so, no N here. In my opinion we could rename the action to “New” and keep the new shortcut and the name of the action inline with each other. This would be the case in a lot of languages.

On a sidenote, do you think we could have all of these shortcuts printed also in the tooltips for each action? This would help a lot in discoverability of the feature.

Like this:
Screenshot 2024-02-23 at 13.44.07

Thanks!

Renaming the action itself is a whole other matter, we have a loosely defined convention in XWiki where we use Create instead of anything else. Changing this one would mean changing all the other uses of Create in the UI, and we’d need to open a VOTE for that. Personally I don’t think that’s a good idea though :S

Note that with the issue explained in post 2, I don’t think it’d be good to use N as a shortcut anymore.
I’m moving my vote onto option 1.

Good idea! :+1: I created a ticket on Jira to keep a trace of this idea :slight_smile:
Implementation should be quite straightforward since all shortcuts rely on a human readable translation keys.

Maybe we can even explain what this letter is:
Create (Shortcut: n)

Thanks for your feedback!
Lucas C.

I guess yeah, fair enough. :+1:

Oh that’s even better. Thanks!

Thanks for the proposal - indeed, this will be one of the desired shortcuts when there’s a need to quickly create a draft or even via template pages with default content.

Why not use instead of C or N a G as generate or combination ctrl + shift + > or the main idea it should look the same as the previous ones and nothing else?

Shift+Cmd+G is used on MacOS browsers to go to the adress bar
Ctrl+G is used in XWiki to goto a page
G is used in XWiki to edit the page using the WYSIWYG editor

I just realized, but using special characters such as > or ` might make the shortcut difficult/ impossible to pull off on some keyboards where those are located in places vastly different from the standard QWERTY layout (or not there at all) …

but there’s a second combination that’s doing the same - it’s an old shortcut that still works, and not many users know or remember it :shushing_face:. If we have 2 combinations that are doing the same, isn’t it overload? For navigation in XWiki I’m using CTRL + \.

Thanks for pointing it out! This second key combo was not documented on https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/KeyboardShortcuts#HNavigation yet. I just added it :+1:

I think it’d still be bad to change the shortcut on Ctrl+G. Given the state of the doc, I’d expect most power-users to use Ctrl+G, and changing the use of this shortcut would be annoying to them.

I’d rather not have to make such a change and instead rely on another key…

1 Like

thanks, I thought long ago to add it, but looking at it as old key couldn’t add it.

depends on user preferences, but CTRL + SHIFT has to be mandatory, then N option will be more suitable for the creation shortcut.

That’s what is documented, but when I try this on playground I never manage to use it honestly… Not sure what needs to be done, in my case I tried adding an annotation to a page then I reloaded hit and type “n”, it didn’t bring me anywhere. Same after displaying the annotation with alt + a.

Now even if the shortcut does work, I’d be +0 to break it as I don’t think it’s a major feature compared to create: we can always find a new one. Now if we do break it, better do it only after the work for being able to change shortcuts in user profile is done.

@surli
I was able to use it on my local distribution, by default the annotation panel is OFF, even with annotations on the page. Therefor we can’t move to it by pressing N.
I had trouble figuring that out too :smiley:
You can try https://test.xwiki.org/xwiki/bin/view/Administration%20Tests/Show%20Document%20Annotations%20Tab# out. I misunderstood at first, the parameter we want to change is NOT in the annotation subsection of the admin menu, but in the presentation one.

From what I understand, Alt + A just displays the annotation themselves, but not the annotation panel at the end of the page. All of these options adn shortcuts are quite confusing. I think it’d be good to simplify them or at least provide clearer documentation/descriptions. Here is a ticket I opened mistakenly when getting confused with this feature last week :slight_smile: