Re: Keyboard shortcut to toggle between Print View and Denemo window
On Tue, 2021-11-09 at 10:19 +, Richard Shann wrote: > > I'll see if Ctrl-w can be easily added to the routine catching Esc on > the subwindows... That's done now, Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Tue, 2021-11-09 at 11:36 +0200, Lib Lists wrote: > On Mon, 8 Nov 2021 at 18:11, Richard Shann > wrote: > > > > On Mon, 2021-11-08 at 11:37 +0200, Lib Lists wrote: > > > On Sun, 7 Nov 2021 at 18:02, Richard Shann < > > > rich...@rshann.plus.com> > > > wrote: > > > > > > > > On Sun, 2021-11-07 at 13:23 +0200, Lib Lists wrote: > > > > > On Sat, 6 Nov 2021 at 19:42, Richard Shann < > > > > > rich...@rshann.plus.com> > > > > > wrote: > > > > > > > > > > > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > > > > > > On Sat, 6 Nov 2021 at 15:56, Richard Shann < > > > > > > > rich...@rshann.plus.com> > > > > > > > wrote: > > > > > > > > [...] > > > > I've just committed a set of "Toggles" into the View menu which > > > > hide/show various windows/panes. I've given them all default > > > > two > > > > key > > > > short cuts starting Esc, so Esc,p for instance shows/hides the > > > > Print > > > > View. The reason for using Esc is that once in the Print View > > > > pressing > > > > Esc again takes you back to the display(*). > > > > > > Awesome, thank you so much! That greatly improves my workflow. > > > I wrote some comments about the current toogle behaviour with > > > different windows: > > > - Print View: works except for the need of performing any action > > > in > > > the window first before being able to close it, > > > > from my testing it is not any action - mouse movements don't help > > (bug > > *do* get acted on) nor do PgDn or up left arrow ... The only key > > press > > that "wakes up" the key press signal is down arrow and that key > > press > > is not actually acted on - not passed on to the handler - but after > > it > > all keystrokes are received by the widget. > > > > > - Command Center: works (esc,c opens CC, esc closes the window), > > > - Lilypond view: esc,l works but esc doesn't close the window, > > > one > > > needs first to click on the Denemo window > > > - Scheme window: same as Lilypond view > > > > right - I've filled these out now. > > > > > > > An additional thought. I initially thought about a toggle option > > > as I > > > noticed that I cannot close Denemo's subwindows (Print View, > > > Scheme, > > > Lilypond, etc.) with 'ctrl,w', as quite common in MacOs > > > (command,w) > > > and as far as I remember on Windows. If ctrl,w would work on all > > > Denemo subwindows this could allow a shortcut to open/focus a > > > window, > > > the same shortcut to switch the focus back to Denemo window > > > (while > > > keeping the other window open) and ctrl,w would close the > > > currently > > > open window (or close score in Denemo window). I suspect though > > > that > > > this is not possible. > > > Hopefully the explanation is clear enough. > > > > There is a horrible snarl around "focus" "iconized" etc. I notice > > that > > when you do (e.g.) Esc,c to get the Command Center the Esc on the > > Command Center returns to the main window by iconizing the Command > > Center. > > (Apologies for my imprecise vocabulary). With 'iconize' do you mean > 'reduce to icon', as equivalent to pressing the leftmost button in > the > attached picture? yes (or at least that's what that left most button looks like it does!) > If that's the case, then on my system I get a > different behaviour: which is the nub of the matter, what happens depends on something outside not only of Denemo, not only of the libraries Denemo links to, but on the "window manager", or (in the case of Microsoft's Windows), the operating system. I'll see if Ctrl-w can be easily added to the routine catching Esc on the subwindows... Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Mon, 8 Nov 2021 at 18:11, Richard Shann wrote: > > On Mon, 2021-11-08 at 11:37 +0200, Lib Lists wrote: > > On Sun, 7 Nov 2021 at 18:02, Richard Shann > > wrote: > > > > > > On Sun, 2021-11-07 at 13:23 +0200, Lib Lists wrote: > > > > On Sat, 6 Nov 2021 at 19:42, Richard Shann < > > > > rich...@rshann.plus.com> > > > > wrote: > > > > > > > > > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > > > > > On Sat, 6 Nov 2021 at 15:56, Richard Shann < > > > > > > rich...@rshann.plus.com> > > > > > > wrote: > > > > > > > [...] > > > I've just committed a set of "Toggles" into the View menu which > > > hide/show various windows/panes. I've given them all default two > > > key > > > short cuts starting Esc, so Esc,p for instance shows/hides the > > > Print > > > View. The reason for using Esc is that once in the Print View > > > pressing > > > Esc again takes you back to the display(*). > > > > Awesome, thank you so much! That greatly improves my workflow. > > I wrote some comments about the current toogle behaviour with > > different windows: > > - Print View: works except for the need of performing any action in > > the window first before being able to close it, > > from my testing it is not any action - mouse movements don't help (bug > *do* get acted on) nor do PgDn or up left arrow ... The only key press > that "wakes up" the key press signal is down arrow and that key press > is not actually acted on - not passed on to the handler - but after it > all keystrokes are received by the widget. > > > - Command Center: works (esc,c opens CC, esc closes the window), > > - Lilypond view: esc,l works but esc doesn't close the window, one > > needs first to click on the Denemo window > > - Scheme window: same as Lilypond view > > right - I've filled these out now. > > > > An additional thought. I initially thought about a toggle option as I > > noticed that I cannot close Denemo's subwindows (Print View, Scheme, > > Lilypond, etc.) with 'ctrl,w', as quite common in MacOs (command,w) > > and as far as I remember on Windows. If ctrl,w would work on all > > Denemo subwindows this could allow a shortcut to open/focus a window, > > the same shortcut to switch the focus back to Denemo window (while > > keeping the other window open) and ctrl,w would close the currently > > open window (or close score in Denemo window). I suspect though that > > this is not possible. > > Hopefully the explanation is clear enough. > > There is a horrible snarl around "focus" "iconized" etc. I notice that > when you do (e.g.) Esc,c to get the Command Center the Esc on the > Command Center returns to the main window by iconizing the Command > Center. (Apologies for my imprecise vocabulary). With 'iconize' do you mean 'reduce to icon', as equivalent to pressing the leftmost button in the attached picture? If that's the case, then on my system I get a different behaviour: when I press Esc (Command Center is on focus), the Denemo window goes to the foreground and the Command Center is still visible, just behind the Denemo window. When I press Esc,c then the Command Center window is closed. Unrelated, but I also noticed that if I minimize the Command Center by clicking the above mentioned leftmost button, the Command Center is created and closed by pressing Esc,c multiple times but always as minimized. Lib Lib Esc, c then hides the Command Center and you need another Esc,c > to actually bring the Command Center back to the front. > > Richard > >
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Mon, 2021-11-08 at 11:37 +0200, Lib Lists wrote: > On Sun, 7 Nov 2021 at 18:02, Richard Shann > wrote: > > > > On Sun, 2021-11-07 at 13:23 +0200, Lib Lists wrote: > > > On Sat, 6 Nov 2021 at 19:42, Richard Shann < > > > rich...@rshann.plus.com> > > > wrote: > > > > > > > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > > > > On Sat, 6 Nov 2021 at 15:56, Richard Shann < > > > > > rich...@rshann.plus.com> > > > > > wrote: > > > > > > [...] > > I've just committed a set of "Toggles" into the View menu which > > hide/show various windows/panes. I've given them all default two > > key > > short cuts starting Esc, so Esc,p for instance shows/hides the > > Print > > View. The reason for using Esc is that once in the Print View > > pressing > > Esc again takes you back to the display(*). > > Awesome, thank you so much! That greatly improves my workflow. > I wrote some comments about the current toogle behaviour with > different windows: > - Print View: works except for the need of performing any action in > the window first before being able to close it, from my testing it is not any action - mouse movements don't help (bug *do* get acted on) nor do PgDn or up left arrow ... The only key press that "wakes up" the key press signal is down arrow and that key press is not actually acted on - not passed on to the handler - but after it all keystrokes are received by the widget. > - Command Center: works (esc,c opens CC, esc closes the window), > - Lilypond view: esc,l works but esc doesn't close the window, one > needs first to click on the Denemo window > - Scheme window: same as Lilypond view right - I've filled these out now. > An additional thought. I initially thought about a toggle option as I > noticed that I cannot close Denemo's subwindows (Print View, Scheme, > Lilypond, etc.) with 'ctrl,w', as quite common in MacOs (command,w) > and as far as I remember on Windows. If ctrl,w would work on all > Denemo subwindows this could allow a shortcut to open/focus a window, > the same shortcut to switch the focus back to Denemo window (while > keeping the other window open) and ctrl,w would close the currently > open window (or close score in Denemo window). I suspect though that > this is not possible. > Hopefully the explanation is clear enough. There is a horrible snarl around "focus" "iconized" etc. I notice that when you do (e.g.) Esc,c to get the Command Center the Esc on the Command Center returns to the main window by iconizing the Command Center. Esc, c then hides the Command Center and you need another Esc,c to actually bring the Command Center back to the front. Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sun, 7 Nov 2021 at 18:02, Richard Shann wrote: > > On Sun, 2021-11-07 at 13:23 +0200, Lib Lists wrote: > > On Sat, 6 Nov 2021 at 19:42, Richard Shann > > wrote: > > > > > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > > > On Sat, 6 Nov 2021 at 15:56, Richard Shann < > > > > rich...@rshann.plus.com> > > > > wrote: > > > > > > > > > > On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > > > > > > A last question, is there an existing way to open the Command > > > > > > Center > > > > > > via a shortcut? I couldn't find a suitable command in the > > > > > > Command > > > > > > Center. > > > > > At present none of the check boxes in the View menu can be > > > > > activated by > > > > > a command :( > > > > > If I can just get my printer working under Mate on Debian I'll > > > > > hopefully find some time to look into it... > > > > > > well I won my battle with the printer. I've created a command in > > > Scheme > > > > > > d-SetViewVisible > > > > > > which takes one or two arguments: the name of a view window and, > > > optionally a boolean so e.g. > > > > > > (d-SetViewVisible "print") > > > makes the Print View visible while > > > > > > (d-SetViewVisible "print" #f) > > > > > > makes the Print View hidden. > > > > > > Others are "lilypond" "command" "playback" "midi-in" "scheme". > > > > > > To get these available via a keyboard shortcut requires creating > > > new > > > commands using the above syntax for each window so that the > > > shortcut > > > can be put onto the commands, I'd suggest putting them in the View > > > menu > > > but hiding them via the Command Center. > > > > Thank you, I just made a new command to show the Print View and it > > works! > > One problem, when I select 'Open Command Center on this Command', the > > Command Center opens on 'Suggest Sharp' and I'm not able to find my > > new commands in the Command Center. > > That sounds strange but rather than dig into that I think that the > further work I've done on this topic may give you what you need. > I've just committed a set of "Toggles" into the View menu which > hide/show various windows/panes. I've given them all default two key > short cuts starting Esc, so Esc,p for instance shows/hides the Print > View. The reason for using Esc is that once in the Print View pressing > Esc again takes you back to the display(*). Awesome, thank you so much! That greatly improves my workflow. I wrote some comments about the current toogle behaviour with different windows: - Print View: works except for the need of performing any action in the window first before being able to close it, - Command Center: works (esc,c opens CC, esc closes the window), - Lilypond view: esc,l works but esc doesn't close the window, one needs first to click on the Denemo window - Scheme window: same as Lilypond view An additional thought. I initially thought about a toggle option as I noticed that I cannot close Denemo's subwindows (Print View, Scheme, Lilypond, etc.) with 'ctrl,w', as quite common in MacOs (command,w) and as far as I remember on Windows. If ctrl,w would work on all Denemo subwindows this could allow a shortcut to open/focus a window, the same shortcut to switch the focus back to Denemo window (while keeping the other window open) and ctrl,w would close the currently open window (or close score in Denemo window). I suspect though that this is not possible. Hopefully the explanation is clear enough. > > I've bumped the version to 2.5.6 for thses new commands. Since you have > your own custom commands now Denemo will attempt to merge them on > startup (if you wish). I *think* you get both new and old commands (and > need to hide any you don't want), but if there is a problem here is an > overview of how the command system works: > Denemo ships with a set of commands arranged as a hierarchy of > files mirroring the menu system. They are found at > ../share/denemo/actions/menus/e.g.(MainMenu/ViewMenu/Toggles) > > Two files .../share/denemo/actions/Default.commands and > ../share/denemo/actions/Default.shortcuts hold a list of all the > commands and their shortcuts. > > When you create a new command it goes into > > ~/.denemo-2.5.6/actions/menus/... > > and ~/.denemo-2.5.6/actions/Default.commands, shortcuts hold you > customized versions of the set of commands you are using. (You can load > any command set from the Command Center). > > I *think* both places are consulted when building the menus. > You can be quite cavalier about the contents of ~/.denemo-2.5.6 as any > customization work you have done will remain untouched in ~/.denemo- > 2.5.5 after the upgrade so you can't actually lose anything. Thank you for the explanation, that clarifies a lot the custom commands management in Denemo. I have to experiment with it, but it's great to know that custom commands and shortcuts are saved in the denemo-2.5.x folder. Cheers, Lib > > HTH > > Richard > > > > >
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sun, 2021-11-07 at 13:23 +0200, Lib Lists wrote: > On Sat, 6 Nov 2021 at 19:42, Richard Shann > wrote: > > > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > > On Sat, 6 Nov 2021 at 15:56, Richard Shann < > > > rich...@rshann.plus.com> > > > wrote: > > > > > > > > On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > > > > > A last question, is there an existing way to open the Command > > > > > Center > > > > > via a shortcut? I couldn't find a suitable command in the > > > > > Command > > > > > Center. > > > > At present none of the check boxes in the View menu can be > > > > activated by > > > > a command :( > > > > If I can just get my printer working under Mate on Debian I'll > > > > hopefully find some time to look into it... > > > > well I won my battle with the printer. I've created a command in > > Scheme > > > > d-SetViewVisible > > > > which takes one or two arguments: the name of a view window and, > > optionally a boolean so e.g. > > > > (d-SetViewVisible "print") > > makes the Print View visible while > > > > (d-SetViewVisible "print" #f) > > > > makes the Print View hidden. > > > > Others are "lilypond" "command" "playback" "midi-in" "scheme". > > > > To get these available via a keyboard shortcut requires creating > > new > > commands using the above syntax for each window so that the > > shortcut > > can be put onto the commands, I'd suggest putting them in the View > > menu > > but hiding them via the Command Center. > > Thank you, I just made a new command to show the Print View and it > works! > One problem, when I select 'Open Command Center on this Command', the > Command Center opens on 'Suggest Sharp' and I'm not able to find my > new commands in the Command Center. That sounds strange but rather than dig into that I think that the further work I've done on this topic may give you what you need. I've just committed a set of "Toggles" into the View menu which hide/show various windows/panes. I've given them all default two key short cuts starting Esc, so Esc,p for instance shows/hides the Print View. The reason for using Esc is that once in the Print View pressing Esc again takes you back to the display(*). I've bumped the version to 2.5.6 for thses new commands. Since you have your own custom commands now Denemo will attempt to merge them on startup (if you wish). I *think* you get both new and old commands (and need to hide any you don't want), but if there is a problem here is an overview of how the command system works: Denemo ships with a set of commands arranged as a hierarchy of files mirroring the menu system. They are found at ../share/denemo/actions/menus/e.g.(MainMenu/ViewMenu/Toggles) Two files .../share/denemo/actions/Default.commands and ../share/denemo/actions/Default.shortcuts hold a list of all the commands and their shortcuts. When you create a new command it goes into ~/.denemo-2.5.6/actions/menus/... and ~/.denemo-2.5.6/actions/Default.commands, shortcuts hold you customized versions of the set of commands you are using. (You can load any command set from the Command Center). I *think* both places are consulted when building the menus. You can be quite cavalier about the contents of ~/.denemo-2.5.6 as any customization work you have done will remain untouched in ~/.denemo- 2.5.5 after the upgrade so you can't actually lose anything. HTH Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 6 Nov 2021 at 19:42, Richard Shann wrote: > > On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > > On Sat, 6 Nov 2021 at 15:56, Richard Shann > > wrote: > > > > > > On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > > > > A last question, is there an existing way to open the Command > > > > Center > > > > via a shortcut? I couldn't find a suitable command in the Command > > > > Center. > > > At present none of the check boxes in the View menu can be > > > activated by > > > a command :( > > > If I can just get my printer working under Mate on Debian I'll > > > hopefully find some time to look into it... > > well I won my battle with the printer. I've created a command in Scheme > > d-SetViewVisible > > which takes one or two arguments: the name of a view window and, > optionally a boolean so e.g. > > (d-SetViewVisible "print") > makes the Print View visible while > > (d-SetViewVisible "print" #f) > > makes the Print View hidden. > > Others are "lilypond" "command" "playback" "midi-in" "scheme". > > To get these available via a keyboard shortcut requires creating new > commands using the above syntax for each window so that the shortcut > can be put onto the commands, I'd suggest putting them in the View menu > but hiding them via the Command Center. Thank you, I just made a new command to show the Print View and it works! One problem, when I select 'Open Command Center on this Command', the Command Center opens on 'Suggest Sharp' and I'm not able to find my new commands in the Command Center. Lib > > > Richard > >
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 2021-11-06 at 16:08 +0200, Lib Lists wrote: > On Sat, 6 Nov 2021 at 15:56, Richard Shann > wrote: > > > > On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > > > A last question, is there an existing way to open the Command > > > Center > > > via a shortcut? I couldn't find a suitable command in the Command > > > Center. > > At present none of the check boxes in the View menu can be > > activated by > > a command :( > > If I can just get my printer working under Mate on Debian I'll > > hopefully find some time to look into it... well I won my battle with the printer. I've created a command in Scheme d-SetViewVisible which takes one or two arguments: the name of a view window and, optionally a boolean so e.g. (d-SetViewVisible "print") makes the Print View visible while (d-SetViewVisible "print" #f) makes the Print View hidden. Others are "lilypond" "command" "playback" "midi-in" "scheme". To get these available via a keyboard shortcut requires creating new commands using the above syntax for each window so that the shortcut can be put onto the commands, I'd suggest putting them in the View menu but hiding them via the Command Center. Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 6 Nov 2021 at 15:56, Richard Shann wrote: > > On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > > A last question, is there an existing way to open the Command Center > > via a shortcut? I couldn't find a suitable command in the Command > > Center. > At present none of the check boxes in the View menu can be activated by > a command :( > If I can just get my printer working under Mate on Debian I'll > hopefully find some time to look into it... Thank you, and good luck with the printer :) Lib > > > Richard > >
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 2021-11-06 at 15:15 +0200, Lib Lists wrote: > A last question, is there an existing way to open the Command Center > via a shortcut? I couldn't find a suitable command in the Command > Center. At present none of the check boxes in the View menu can be activated by a command :( If I can just get my printer working under Mate on Debian I'll hopefully find some time to look into it... Richard
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 6 Nov 2021 at 13:55, Richard Shann wrote: > > On Sat, 2021-11-06 at 12:40 +0200, Lib Lists wrote: > > Hello, > > > > I'm trying to create a keyboard shortcut that would toggle (or open) > > the Print View and then go back to the Denemo editing window, but I > > cannot find a way to do that. I found 'Print Preview' in the Command > > Center, but I cannot find how to go back to the Denemo window. > > Similarly, I'm trying to create a shortcut that toggles between the > > Command Center and the Denemo window. > > Well once the focus is not on the Denemo Display (aka Edit Window) the > Denemo shortcuts no longer apply so a command to switch back to the > Denemo Display couldn't be accessed from a shortcut except when already > on the Denemo Display. > So instead I've installed signal handlers on the Command Center, the > Print View and the Source View which all respond to the Esc key by > switching the focus back to the Denemo Display. > > One very strange wrinkle though - the Print View does not respond to > this keypress the first time until it has responded to something else > first - pressing down arrow while on the Print View scrolls down, after > which pressing Esc switches back to the display. > > Enjoy! Wow, thank you, that works perfectly! A last question, is there an existing way to open the Command Center via a shortcut? I couldn't find a suitable command in the Command Center. Cheers, Lib > > Richard > > > Is there a way to achieve that (I'm trying to avoid using the mouse > > as > > much as possible)? > > Thank you for your help, > > Lib > > > >
Re: Keyboard shortcut to toggle between Print View and Denemo window
On Sat, 2021-11-06 at 12:40 +0200, Lib Lists wrote: > Hello, > > I'm trying to create a keyboard shortcut that would toggle (or open) > the Print View and then go back to the Denemo editing window, but I > cannot find a way to do that. I found 'Print Preview' in the Command > Center, but I cannot find how to go back to the Denemo window. > Similarly, I'm trying to create a shortcut that toggles between the > Command Center and the Denemo window. Well once the focus is not on the Denemo Display (aka Edit Window) the Denemo shortcuts no longer apply so a command to switch back to the Denemo Display couldn't be accessed from a shortcut except when already on the Denemo Display. So instead I've installed signal handlers on the Command Center, the Print View and the Source View which all respond to the Esc key by switching the focus back to the Denemo Display. One very strange wrinkle though - the Print View does not respond to this keypress the first time until it has responded to something else first - pressing down arrow while on the Print View scrolls down, after which pressing Esc switches back to the display. Enjoy! Richard > Is there a way to achieve that (I'm trying to avoid using the mouse > as > much as possible)? > Thank you for your help, > Lib >
Keyboard shortcut to toggle between Print View and Denemo window
Hello, I'm trying to create a keyboard shortcut that would toggle (or open) the Print View and then go back to the Denemo editing window, but I cannot find a way to do that. I found 'Print Preview' in the Command Center, but I cannot find how to go back to the Denemo window. Similarly, I'm trying to create a shortcut that toggles between the Command Center and the Denemo window. Is there a way to achieve that (I'm trying to avoid using the mouse as much as possible)? Thank you for your help, Lib