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

Keyboard shortcut support #24

Closed
sjhstone opened this issue Nov 5, 2017 · 5 comments
Closed

Keyboard shortcut support #24

sjhstone opened this issue Nov 5, 2017 · 5 comments
Labels
Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.)

Comments

@sjhstone
Copy link

sjhstone commented Nov 5, 2017

Expected Behavior

Support for key combo press (keyboard shortcut) event trigger.

Current Behavior

Currently, we can only trigger add-in reaction by

  • adding new UI component on Ribbon / side panel;
  • adding selection in the context menu (right-click triggered).

Context

Many user scenarios call for continuous and seamless environment change.

An existing example is the equation editor. In desktop client of Word, PowerPoint and OneNote, we can create new equation field by pressing Alt + =.

Case: code pieces in document

Take code formatting as an example. The solutions we have now are very limited. They all have unsatisfactory experiences.

Analysis: Pasting from other text editor

We can copy HTML-formatted code from VS Code or other code editors into Word. However, it involves launching instances of other applications.

Analysis: Existing Add-in code format

Or, we can use the existing code format add-in. If a user wants to write directly in Word document, he is then required to edit the code in regular text environment first, where auto-indentation and auto-capitalization experience can be horribly disturbing. It also requires the user to do selection after they get the code ready.

Ideal flow

  1. Create a new field by pressing combo key, like Alt + ,, or Alt + Shift + {,
  2. A new field is created and cursor is active inside it,
  3. A ribbon tab is highlighted, with options to publish the snippet as a Gist, or to the user defined endpoint,
  4. When the user get his cursor outside this region, the field becomes inactive, and code highlighter is executed on the given code snippet.

Wrapping up

From discussion with staffs here at O365 DevDays 2017 in Shanghai, there are no current public API available for such experiences. They suggest that an issue should be posted here to stress such needs. The proposed ideal flow case also requires other potential API creations. However, the general idea here is to further modularize document elements and integrate them more seamlessly, in a way that is similar to the Python Jupyter Notebook experience or Mathematica Notebook experience.

@sumurthy
Copy link
Contributor

Thanks for the detailed notes. Though I'm not sure how much of key stroke events can be propagated to a web add-in. Will get back...

@sumurthy
Copy link
Contributor

This is pretty low in the roadmap at this time. No ETA yet.

@sumurthy sumurthy added the Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.) label Nov 15, 2017
@sumurthy sumurthy reopened this Nov 15, 2017
@1TheMuffinMan
Copy link

That's a bummer that this is low priority. Excel for Mac for example is a pretty poor implementation compared to Windows and it would be great if developers could bridge the gap with the Javascript API.

What do you mean you're not sure how much of key stroke events can be propagated to a web add-in? You're already propagating events from a native application to a web add-in everywhere else.

@JuaneloJuanelo
Copy link

this is a feature request, please use https://officespdev.uservoice.com/

@rvanlaak
Copy link

rvanlaak commented Jul 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.)
Projects
None yet
Development

No branches or pull requests

5 participants