Bug 123768

Summary: Make shortcuts extensionizable
Product: LibreOffice Reporter: A.K. <ashutoshkukreti1212>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: ASSIGNED ---    
Severity: enhancement CC: 79045_79045, eyalroz1, heiko.tietze, mentoring, momonasmon, printfdebugging, reaamina, tobias336, vsfoote
Priority: medium Keywords: difficultyBeginner, easyHack, skillDesign, topicUI
Version: 6.2.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=107346
https://bugs.documentfoundation.org/show_bug.cgi?id=120132
https://bugs.documentfoundation.org/show_bug.cgi?id=158355
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 98259    

Description A.K. 2019-02-28 15:11:19 UTC
Description:
Is this possible to automatically import MS-office shortcuts in libre office?

Also while writing formulas in calc it would be better if pressing tab automatically completes the formula just like WPS excel. While writing formulas a list will be very helpful to see the available formulas.

Actual Results:
It's very difficult to add all the shortcuts manually

Expected Results:
Should import them automatically


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2019-03-02 15:55:59 UTC
Need love from UX-team

My 5 cents:

It need to realize different presets of shortcuts sets.

But, LibreOffice isn't a clone of MSO anyway and if MS will be change its shortcuts again and again, then LibreOffice devs must be repeat this change again and again in LO.

I don't like the idea
Comment 2 Jean-Francois Nifenecker 2019-03-02 19:53:39 UTC
(In reply to A.K. from comment #0)
> Description:
> Is this possible to automatically import MS-office shortcuts in libre office?
> 

This question has been asked for years on the various LibO (and before, OOo) discussion channels. This actually can be done: someone with good MSO knowledge could provide a comprehensive list of shortcuts for a given MSO version. 

As LibreOffice allows to save the current set of shortcuts (Tools > Customize > Keyboard, Save), it would then be feasible to integrate them to the corresponding LibO options (just amend the /Configuration2/accelerator/current.xml file).

Once the said file is setup, just reload it into LibO to get advantage of the MSO shortcuts :)

So, I can't see why noone involved would'nt go and try that route. This doesn't require any LibO change, since the options are there already.
Comment 3 Heiko Tietze 2019-03-04 09:20:08 UTC
Rather than loading some weird alien format we should make the shortcuts extensionizable. Meaning you or someone else collects the MSO shortcuts and provides this list for user customization.

I adjust the summary accordingly.
Comment 5 Heiko Tietze 2019-03-04 10:32:16 UTC
(In reply to A.K. from comment #4)
> @Heiko Tietze will these lists work:
> ...

The point is not what shortcut exactly is assigned but how we do it. First, we have to make sure that "extended" characters are accepted (Ä,Д,ξ, etc) and then we should sharing different solutions.

Today we have hard-coded keyevents restricted to English and you can configure the shortcuts yourself via Tools > Customize. The envisioned extension would allow to share these self-made assignments.
Comment 6 Maxim Monastirsky 2019-03-04 13:49:37 UTC
(In reply to Heiko Tietze from comment #3)
> we should make the shortcuts extensionizable.
This is already possible. Shortcuts are part of the configuration, so it is possible to override them from an extension. The wiki has a guide about creating configuration extensions: https://wiki.documentfoundation.org/images/b/b0/LibreOffice_config_extension_writing.pdf

Of course, there is also the other approach with the Load.../Save... buttons in the Keyboard tab of the customization dialog, like mentioned in comment 2. This results with a xml file inside zip, which can be edited and shared with other people as well.
Comment 7 Heiko Tietze 2019-03-06 10:32:20 UTC
(In reply to Maxim Monastirsky from comment #6)
> This is already possible. Shortcuts are part of the configuration...

Super cool. Then we have a very simple, design-oriented easy hack. Who wants to take it?
Comment 8 Heiko Tietze 2020-02-02 11:53:30 UTC
Rania, you might be interested in this topic.
Comment 9 Heiko Tietze 2022-09-22 08:23:24 UTC
*** Bug 151106 has been marked as a duplicate of this bug. ***
Comment 10 Heiko Tietze 2023-11-27 11:50:15 UTC
*** Bug 158355 has been marked as a duplicate of this bug. ***
Comment 11 Sahil Gautam 2024-05-29 15:42:43 UTC
@Heiko, from what I understand, here the task is to create an extension (with a configuration file) and then push it to the extensions site. Something like a prototype extension which contains microsoft's keyboard shortcuts?
Comment 12 Heiko Tietze 2024-05-29 15:46:18 UTC
(In reply to Sahil Gautam from comment #11)
> @Heiko, from what I understand, here the task is to create an extension
> (with a configuration file) and then push it to the extensions site.
> Something like a prototype extension which contains microsoft's keyboard
> shortcuts?
Yes, more or less. I think the template approach is not intuitiv and I suggest to introduce a dedicated path. No idea how much time it takes to make it possible, just thought you wanted to work in this field.
Comment 13 Sahil Gautam 2024-05-29 15:52:39 UTC
Yes, now I think, it would be better if somehow we can parse microsoft's exported keyboard shortcuts file and then create an xml file for ours (configuration), and then load it into the application. That would be a better solution. 

An extension can do it I guess. we ship python with the application, and extensions can be written in python. Might I give this a try? (thumbs up Heiko?)
Comment 14 Heiko Tietze 2024-05-29 16:50:23 UTC
Sounds like over-engineering. What I have in mind is

<extension header>
  <menu:menu menu:id=".uno:PickList">
      <menu:".uno:AddDirect"/>
      <menu:".uno:OpenFromWriter"/>
      <menu:separator/>
      <menu:".uno:RecentFileList"/>
...
  </menu>
</extension header>

So essentially the menubar.xml packed into an extension and loaded via tools > customize:  menu. If the community parses the shortcuts from other applications and pack it into this file, I'm happy.