-
-
Notifications
You must be signed in to change notification settings - Fork 242
Description
I decided to test whether the "Save New Snippet" feature would work if I assigned a shortcut key to it. I figured so many things are wonky in that feature, that I might as well flush them all out now. So, I assigned a shortcut key to the "Save New Snippet" in the Settings. And it just behaved even weirder than I expected.
Problem to Solve
When a shortcut key is assigned to "Save New Snippet" said shortcut key is only recognized when only one "element" (or a partial element) is selected within OneNote. By "element," I mean what is commonly called a paragraph in OneNote.
However, because of issue 1786, all that does is pop up the error message saying I needed to have selected text.
That was to be expected (until the update comes out). {Note: the screen shot with the error message does not show the selected text because the highlighting for the selected text disappears as soon as the error message pops up. Said highlighting reappears after I close the error message.}
However, the weirdness occurs when I select an appropriate amount of text so that Issue 1786 shouldn't apply.
In fact, nothing happens at all. It doesn't pop up the error message. But it also doesn't pop up the dialog asking me to name the snippet. Literally nothing happens. It appears that the keyboard shortcut is being ignored.
I have tried a couple of different shortcuts. Neither of them seem to work.
To Reproduce
- Create shortcut for "Save New Snippet."
- Select two lines of text.
- Use shortcut.
- Nothing happens.
Expected Behavior
It should open the "Save New Snippet" dialog and let me enter a name for my new Snippet.
Screenshots
Above.
Environment (if applicable)
In log file.
Additional Context
The first section of this log file is from when I was demonstrating that the shortcut key did work when only one element is selected. I did that twice. Then, I tested it with more than one element selected. and nothing even showed up in the log file. Then, I went into settings and changed the shortcut key. That forced me to restart and that is the second section of this log file. During that time I only tried to use the shortcut key on two elements and no "Save New Snippet" entry was even made into the log file.
01|02:19:38.270| Starting dllhost 13872, 2592 Mhz, 16 MB, en-US/en-US, v6.7.1, OneNote 15.0, Office 16.0, 2025-02-26 14:19
01|02:19:38.272| ..Windows 11 Professional, Version 24H2, Build 26100, 64 bit
01|02:19:38.275| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18429.20158)
03|02:19:38.291| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
03|02:19:38.292| ..OneAddInsUpdate(custom[])
01|02:19:38.817| ..building ribbon
01|02:19:38.821| ..building ribbon colorizer commands
01|02:19:38.994| ..building context menu
01|02:19:38.994| ..cannot add ribSaveSnippetButton command to context menu, element not found
01|02:19:39.029| ..OnStartupComplete(custom[])
01|02:19:39.031| ..starting command service
01|02:19:39.031| ..starting reminder service
01|02:19:39.033| ..starting navigation service
01|02:19:39.035| ..hashtag service is disabled
01|02:19:39.035| ..ready
10|02:19:39.042| Running command UpdateCommand
04|02:19:39.778| ..defined 56 hotkeys for input locale 1033
09|02:19:40.232| ..fetched 6.7.2, 2025-01-07T18:34:22Z - "ToC Fix PRERELEASE"
09|02:19:40.232| ..fetched 6.7.1, 2025-01-02T23:27:48Z - "Retied in a Ribbon"
09|02:19:40.232| ..fetched 6.7.0, 2024-12-31T15:20:27Z - "Tied in a Ribbon PRERELEASE"
09|02:19:40.232| ..fetched 6.6.1, 2024-11-04T17:16:34Z - "Autumn 2024 plus Fix to Alt-F Favorites dialog"
09|02:19:40.232| ..fetched 6.6.0, 2024-11-03T00:42:16Z - "Autumn 2024"
10|02:19:46.169| Running command SaveSnippetCommand
11|02:19:53.541| Running command SaveSnippetCommand
18|02:29:16.729| Running command SettingsCommand
18|02:31:12.955| ..user settings saved, restart:True
16|02:31:15.156| OnBeginShutdown(custom[])
16|02:31:15.156| ..shutting down UI
16|02:31:15.161| ..OnDisconnection(RemoveMode:ext_dm_HostShutdown,custom:[])
16|02:31:15.161| ..disposing 14 streams
16|02:31:15.161| ..closing log
01|02:31:17.771| Starting dllhost 6736, 2592 Mhz, 16 MB, en-US/en-US, v6.7.1, OneNote 15.0, Office 16.0, 2025-02-26 14:31
01|02:31:17.773| ..Windows 11 Professional, Version 24H2, Build 26100, 64 bit
01|02:31:17.776| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18429.20158)
03|02:31:17.792| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
03|02:31:17.792| ..OneAddInsUpdate(custom[])
04|02:31:18.268| ..building ribbon
04|02:31:18.272| ..building ribbon colorizer commands
04|02:31:18.440| ..building context menu
04|02:31:18.440| ..cannot add ribSaveSnippetButton command to context menu, element not found
04|02:31:18.473| ..OnStartupComplete(custom[])
04|02:31:18.476| ..starting command service
04|02:31:18.476| ..starting reminder service
04|02:31:18.478| ..starting navigation service
04|02:31:18.479| ..hashtag service is disabled
04|02:31:18.479| ..ready
11|02:31:18.485| Running command UpdateCommand
05|02:31:19.235| ..defined 56 hotkeys for input locale 1033
10|02:31:19.701| ..fetched 6.7.2, 2025-01-07T18:34:22Z - "ToC Fix PRERELEASE"
10|02:31:19.701| ..fetched 6.7.1, 2025-01-02T23:27:48Z - "Retied in a Ribbon"
10|02:31:19.701| ..fetched 6.7.0, 2024-12-31T15:20:27Z - "Tied in a Ribbon PRERELEASE"
10|02:31:19.701| ..fetched 6.6.1, 2024-11-04T17:16:34Z - "Autumn 2024 plus Fix to Alt-F Favorites dialog"
10|02:31:19.701| ..fetched 6.6.0, 2024-11-03T00:42:16Z - "Autumn 2024"
At 2:35, I attempted to use the shortcut key, on two lines of text, yet again, to verify that no entry was even being made in the log. In the two entries above, repeated here:
10|02:19:46.169| Running command SaveSnippetCommand
11|02:19:53.541| Running command SaveSnippetCommand
... that was when I was using the shortcut key with only one element/paragraph selected.
The log file is definitely being updated in Notepad++ every time OneMore writes another line to the log file.