Skip to content

Animate view switcher on formatting shortcuts in view mode#15408

Merged
eszkadev merged 1 commit into
mainfrom
private/banobepascal/viewmode-keystrokes
Apr 15, 2026
Merged

Animate view switcher on formatting shortcuts in view mode#15408
eszkadev merged 1 commit into
mainfrom
private/banobepascal/viewmode-keystrokes

Conversation

@banobepascal
Copy link
Copy Markdown
Contributor

Change-Id: I6b827a51d71f4cc903e60ca38615a6a30e9545d5

  • Resolves: #
  • Target version: main

Summary

  • Registers formatting shortcuts like Ctrl+B, Ctrl+I, and Ctrl+U globally so they are always intercepted, even when in viewmode.

  • Prevents the browser’s default actions (like opening sidebars or page source) and, in view mode, triggers the view mode switcher animation instead of silently ignoring the input.

PREVIEW

online-view.mp4

@github-project-automation github-project-automation Bot moved this to To Review in Collabora Online Apr 7, 2026
@banobepascal banobepascal force-pushed the private/banobepascal/viewmode-keystrokes branch 2 times, most recently from 8bb291d to 9cdfe0a Compare April 8, 2026 01:23
@banobepascal banobepascal force-pushed the private/banobepascal/viewmode-keystrokes branch from 9cdfe0a to 2a88280 Compare April 9, 2026 07:32
Comment on lines +343 to +346
new ShortcutDescriptor({ eventType: 'keydown', modifier: Mod.CTRL, key: 'b', unoAction: '.uno:Bold' }),
new ShortcutDescriptor({ eventType: 'keydown', modifier: Mod.CTRL, key: 'i', unoAction: '.uno:Italic' }),
new ShortcutDescriptor({ eventType: 'keydown', modifier: Mod.CTRL, key: 'u', unoAction: '.uno:Underline' }),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work on a mac?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this works on Mac both Safari and Chome

Here is a screenplay on safari

Online.webm

 - Registers formatting shortcuts like Ctrl+B, Ctrl+I, and Ctrl+U globally so
   they are always intercepted, even when in viewmode.

 - Prevents the browser’s default actions (like opening sidebars or page source)
   and, in view mode, triggers the view mode switcher animation instead of silently
   ignoring the input.

Signed-off-by: Banobe Pascal <banobe.pascal@collabora.com>
Change-Id: I6b827a51d71f4cc903e60ca38615a6a30e9545d5
@banobepascal banobepascal force-pushed the private/banobepascal/viewmode-keystrokes branch from 2a88280 to 3a86562 Compare April 14, 2026 01:52
Copy link
Copy Markdown
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok

@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Apr 14, 2026
@eszkadev eszkadev merged commit afbb597 into main Apr 15, 2026
15 checks passed
@eszkadev eszkadev deleted the private/banobepascal/viewmode-keystrokes branch April 15, 2026 10:24
@github-project-automation github-project-automation Bot moved this from To Test to Done in Collabora Online Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants